Skip to content

Commit c22addc

Browse files
[native] update p/invoke tables for libSystem.Native.so (#10330)
Fixes: #10329 Context: dotnet/runtime#116639 Some `SystemNative_` methods were removed/changed in .NET 10 Preview 6. We should update our tables.
1 parent d3e797f commit c22addc

File tree

4 files changed

+12
-18
lines changed

4 files changed

+12
-18
lines changed

src/native/clr/pinvoke-override/generate-pinvoke-tables.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,6 @@ const std::vector<std::string> dotnet_pinvoke_names = {
285285
"SystemNative_GetPwNamR",
286286
"SystemNative_GetPwUidR",
287287
"SystemNative_GetRawSockOpt",
288-
"SystemNative_GetReadDirRBufferSize",
289288
"SystemNative_GetRLimit",
290289
"SystemNative_GetSid",
291290
"SystemNative_GetSignalForBreak",
@@ -358,7 +357,7 @@ const std::vector<std::string> dotnet_pinvoke_names = {
358357
"SystemNative_PWrite",
359358
"SystemNative_PWriteV",
360359
"SystemNative_Read",
361-
"SystemNative_ReadDirR",
360+
"SystemNative_ReadDir",
362361
"SystemNative_ReadEvents",
363362
"SystemNative_ReadLink",
364363
"SystemNative_ReadProcessStatusInfo",

src/native/clr/pinvoke-override/pinvoke-tables.include

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ namespace {
4242
}};
4343

4444
//64-bit DotNet p/invoke table
45-
std::array<PinvokeEntry, 491> dotnet_pinvokes {{
45+
std::array<PinvokeEntry, 490> dotnet_pinvokes {{
4646
{0x99f2ee02463000, "CompressionNative_Crc32", nullptr},
4747
{0xb38afc8bfe830b, "SystemNative_Bind", nullptr},
4848
{0x190fe65d8736dcb, "SystemNative_TryGetIPPacketInformation", nullptr},
@@ -100,7 +100,6 @@ namespace {
100100
{0x146cd1dc4fb2ba58, "SystemNative_LChflagsCanSetHiddenFlag", nullptr},
101101
{0x14b7e3527b60e83f, "CryptoNative_ErrErrorStringN", nullptr},
102102
{0x15bd710d3a9b3b0c, "CryptoNative_EvpDigestFinalEx", nullptr},
103-
{0x176e22ea7c580dae, "SystemNative_ReadDirR", nullptr},
104103
{0x18580a4592ed1ea6, "GlobalizationNative_GetSortKey", nullptr},
105104
{0x185f5d25252c3c72, "SystemNative_FAllocate", nullptr},
106105
{0x18d6b5e9fec9b0dc, "SystemNative_Connectx", nullptr},
@@ -234,7 +233,6 @@ namespace {
234233
{0x5ffae3c8023a80b8, "AndroidCryptoNative_SSLStreamGetPeerCertificate", nullptr},
235234
{0x600b4418896f7808, "SystemNative_Exit", nullptr},
236235
{0x6089f0c8112eb3d9, "SystemNative_InitializeConsoleBeforeRead", nullptr},
237-
{0x613307e537d462db, "SystemNative_GetReadDirRBufferSize", nullptr},
238236
{0x61bacd7170fd8c9b, "SystemNative_SchedSetAffinity", nullptr},
239237
{0x61f3ce1b18b20d6f, "SystemNative_GetNativeIPInterfaceStatistics", nullptr},
240238
{0x62351df42d842942, "SystemNative_GetSignalForBreak", nullptr},
@@ -500,6 +498,7 @@ namespace {
500498
{0xf0658a22dd5ede19, "SystemNative_SNPrintF_1I", nullptr},
501499
{0xf0ec052da6c5fa70, "SystemNative_EnumerateGatewayAddressesForInterface", nullptr},
502500
{0xf1577384f409ea85, "AndroidCryptoNative_BigNumToBinary", nullptr},
501+
{0xf1c2bc01e94156af, "SystemNative_ReadDir", nullptr},
503502
{0xf2c7fa39bf166188, "SystemNative_Free", nullptr},
504503
{0xf2d074e0aeca51ce, "GlobalizationNative_GetLocales", nullptr},
505504
{0xf3693f3cadb9b6f4, "GlobalizationNative_EnumCalendarInfo", nullptr},
@@ -577,7 +576,7 @@ constexpr hash_t system_globalization_native_library_hash = 0x28b5c8fca080abd5;
577576
}};
578577

579578
//32-bit DotNet p/invoke table
580-
std::array<PinvokeEntry, 491> dotnet_pinvokes {{
579+
std::array<PinvokeEntry, 490> dotnet_pinvokes {{
581580
{0xaf6b1c, "AndroidCryptoNative_RsaPrivateDecrypt", nullptr},
582581
{0x1733089, "SystemNative_SetTerminalInvalidationHandler", nullptr},
583582
{0x1dd1f00, "AndroidCryptoNative_Aes192Cfb8", nullptr},
@@ -624,6 +623,7 @@ constexpr hash_t system_globalization_native_library_hash = 0x28b5c8fca080abd5;
624623
{0x1a302b28, "SystemNative_SchedSetAffinity", nullptr},
625624
{0x1aa4105d, "GlobalizationNative_GetSortKey", nullptr},
626625
{0x1ab1248e, "SystemNative_GetHostName", nullptr},
626+
{0x1ad0dc45, "SystemNative_ReadDir", nullptr},
627627
{0x1ae2353d, "SystemNative_MemfdCreate", nullptr},
628628
{0x1bf277c4, "SystemNative_WaitForSocketEvents", nullptr},
629629
{0x1c4778bf, "SystemNative_AlignedFree", nullptr},
@@ -657,7 +657,6 @@ constexpr hash_t system_globalization_native_library_hash = 0x28b5c8fca080abd5;
657657
{0x2bc9ff5e, "AndroidCryptoNative_SSLStreamGetProtocol", nullptr},
658658
{0x2c4415fd, "AndroidCryptoNative_AeadCipherFinalEx", nullptr},
659659
{0x2c467430, "AndroidCryptoNative_GetECCurveParameters", nullptr},
660-
{0x2d21ad97, "SystemNative_GetReadDirRBufferSize", nullptr},
661660
{0x2d6e4a1c, "AndroidCryptoNative_X509StoreRemoveCertificate", nullptr},
662661
{0x2e66f31b, "BrotliDecoderDestroyInstance", nullptr},
663662
{0x2eb28fb6, "SystemNative_GetIPv4Address", nullptr},
@@ -786,7 +785,6 @@ constexpr hash_t system_globalization_native_library_hash = 0x28b5c8fca080abd5;
786785
{0x68c949a0, "AndroidCryptoNative_X509GetContentType", nullptr},
787786
{0x68f9f52f, "AndroidCryptoNative_CipherIsSupported", nullptr},
788787
{0x6907c8eb, "BrotliEncoderSetParameter", nullptr},
789-
{0x6adb646e, "SystemNative_ReadDirR", nullptr},
790788
{0x6b5343a0, "SystemNative_SetErrNo", nullptr},
791789
{0x6bbd3d10, "SystemNative_GetRLimit", nullptr},
792790
{0x6be1e33d, "SystemNative_EnumerateInterfaceAddresses", nullptr},
@@ -1082,5 +1080,5 @@ constexpr hash_t system_globalization_native_library_hash = 0xa66f1e5a;
10821080
#endif
10831081

10841082
constexpr size_t internal_pinvokes_count = 27;
1085-
constexpr size_t dotnet_pinvokes_count = 491;
1083+
constexpr size_t dotnet_pinvokes_count = 490;
10861084
} // end of anonymous namespace

src/native/mono/pinvoke-override/generate-pinvoke-tables.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,6 @@ const std::vector<std::string> dotnet_pinvoke_names = {
271271
"SystemNative_GetPwNamR",
272272
"SystemNative_GetPwUidR",
273273
"SystemNative_GetRawSockOpt",
274-
"SystemNative_GetReadDirRBufferSize",
275274
"SystemNative_GetRLimit",
276275
"SystemNative_GetSid",
277276
"SystemNative_GetSignalForBreak",
@@ -344,7 +343,7 @@ const std::vector<std::string> dotnet_pinvoke_names = {
344343
"SystemNative_PWrite",
345344
"SystemNative_PWriteV",
346345
"SystemNative_Read",
347-
"SystemNative_ReadDirR",
346+
"SystemNative_ReadDir",
348347
"SystemNative_ReadEvents",
349348
"SystemNative_ReadLink",
350349
"SystemNative_ReadProcessStatusInfo",

src/native/mono/pinvoke-override/pinvoke-tables.include

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ namespace {
5353
}};
5454

5555
//64-bit DotNet p/invoke table
56-
std::array<PinvokeEntry, 491> dotnet_pinvokes {{
56+
std::array<PinvokeEntry, 490> dotnet_pinvokes {{
5757
{0x99f2ee02463000, "CompressionNative_Crc32", nullptr},
5858
{0xb38afc8bfe830b, "SystemNative_Bind", nullptr},
5959
{0x190fe65d8736dcb, "SystemNative_TryGetIPPacketInformation", nullptr},
@@ -111,7 +111,6 @@ namespace {
111111
{0x146cd1dc4fb2ba58, "SystemNative_LChflagsCanSetHiddenFlag", nullptr},
112112
{0x14b7e3527b60e83f, "CryptoNative_ErrErrorStringN", nullptr},
113113
{0x15bd710d3a9b3b0c, "CryptoNative_EvpDigestFinalEx", nullptr},
114-
{0x176e22ea7c580dae, "SystemNative_ReadDirR", nullptr},
115114
{0x18580a4592ed1ea6, "GlobalizationNative_GetSortKey", nullptr},
116115
{0x185f5d25252c3c72, "SystemNative_FAllocate", nullptr},
117116
{0x18d6b5e9fec9b0dc, "SystemNative_Connectx", nullptr},
@@ -245,7 +244,6 @@ namespace {
245244
{0x5ffae3c8023a80b8, "AndroidCryptoNative_SSLStreamGetPeerCertificate", nullptr},
246245
{0x600b4418896f7808, "SystemNative_Exit", nullptr},
247246
{0x6089f0c8112eb3d9, "SystemNative_InitializeConsoleBeforeRead", nullptr},
248-
{0x613307e537d462db, "SystemNative_GetReadDirRBufferSize", nullptr},
249247
{0x61bacd7170fd8c9b, "SystemNative_SchedSetAffinity", nullptr},
250248
{0x61f3ce1b18b20d6f, "SystemNative_GetNativeIPInterfaceStatistics", nullptr},
251249
{0x62351df42d842942, "SystemNative_GetSignalForBreak", nullptr},
@@ -511,6 +509,7 @@ namespace {
511509
{0xf0658a22dd5ede19, "SystemNative_SNPrintF_1I", nullptr},
512510
{0xf0ec052da6c5fa70, "SystemNative_EnumerateGatewayAddressesForInterface", nullptr},
513511
{0xf1577384f409ea85, "AndroidCryptoNative_BigNumToBinary", nullptr},
512+
{0xf1c2bc01e94156af, "SystemNative_ReadDir", nullptr},
514513
{0xf2c7fa39bf166188, "SystemNative_Free", nullptr},
515514
{0xf2d074e0aeca51ce, "GlobalizationNative_GetLocales", nullptr},
516515
{0xf3693f3cadb9b6f4, "GlobalizationNative_EnumCalendarInfo", nullptr},
@@ -598,7 +597,7 @@ constexpr hash_t system_globalization_native_library_hash = 0x28b5c8fca080abd5;
598597
}};
599598

600599
//32-bit DotNet p/invoke table
601-
std::array<PinvokeEntry, 491> dotnet_pinvokes {{
600+
std::array<PinvokeEntry, 490> dotnet_pinvokes {{
602601
{0xaf6b1c, "AndroidCryptoNative_RsaPrivateDecrypt", nullptr},
603602
{0x1733089, "SystemNative_SetTerminalInvalidationHandler", nullptr},
604603
{0x1dd1f00, "AndroidCryptoNative_Aes192Cfb8", nullptr},
@@ -645,6 +644,7 @@ constexpr hash_t system_globalization_native_library_hash = 0x28b5c8fca080abd5;
645644
{0x1a302b28, "SystemNative_SchedSetAffinity", nullptr},
646645
{0x1aa4105d, "GlobalizationNative_GetSortKey", nullptr},
647646
{0x1ab1248e, "SystemNative_GetHostName", nullptr},
647+
{0x1ad0dc45, "SystemNative_ReadDir", nullptr},
648648
{0x1ae2353d, "SystemNative_MemfdCreate", nullptr},
649649
{0x1bf277c4, "SystemNative_WaitForSocketEvents", nullptr},
650650
{0x1c4778bf, "SystemNative_AlignedFree", nullptr},
@@ -678,7 +678,6 @@ constexpr hash_t system_globalization_native_library_hash = 0x28b5c8fca080abd5;
678678
{0x2bc9ff5e, "AndroidCryptoNative_SSLStreamGetProtocol", nullptr},
679679
{0x2c4415fd, "AndroidCryptoNative_AeadCipherFinalEx", nullptr},
680680
{0x2c467430, "AndroidCryptoNative_GetECCurveParameters", nullptr},
681-
{0x2d21ad97, "SystemNative_GetReadDirRBufferSize", nullptr},
682681
{0x2d6e4a1c, "AndroidCryptoNative_X509StoreRemoveCertificate", nullptr},
683682
{0x2e66f31b, "BrotliDecoderDestroyInstance", nullptr},
684683
{0x2eb28fb6, "SystemNative_GetIPv4Address", nullptr},
@@ -807,7 +806,6 @@ constexpr hash_t system_globalization_native_library_hash = 0x28b5c8fca080abd5;
807806
{0x68c949a0, "AndroidCryptoNative_X509GetContentType", nullptr},
808807
{0x68f9f52f, "AndroidCryptoNative_CipherIsSupported", nullptr},
809808
{0x6907c8eb, "BrotliEncoderSetParameter", nullptr},
810-
{0x6adb646e, "SystemNative_ReadDirR", nullptr},
811809
{0x6b5343a0, "SystemNative_SetErrNo", nullptr},
812810
{0x6bbd3d10, "SystemNative_GetRLimit", nullptr},
813811
{0x6be1e33d, "SystemNative_EnumerateInterfaceAddresses", nullptr},
@@ -1102,5 +1100,5 @@ constexpr hash_t system_globalization_native_library_hash = 0xa66f1e5a;
11021100
#endif
11031101

11041102
constexpr size_t internal_pinvokes_count = 38;
1105-
constexpr size_t dotnet_pinvokes_count = 491;
1103+
constexpr size_t dotnet_pinvokes_count = 490;
11061104
} // end of anonymous namespace

0 commit comments

Comments
 (0)