-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Closed
Description
I merged this PR today which adds a new native call to the gegrgid_r method. Apparently this broke the Android build.
I discovered this build failure in my draft PR in which I ran /azp run runtime-extra-platforms. Here are the CI results.
The build error is:
/home/carlos/runtime/src/native/libs/System.Native/pal_uid.c(253,13): error G39D4492F: implicit declaration of function 'getgrgid_r' is invalid in C99 [-Werror,-Wimplicit-function-declaration] [/home/carlos/runtime/src/native/libs/build-native.proj]
/home/carlos/runtime/src/native/libs/System.Native/pal_uid.c(253,13): error G39D4492F: implicit declaration of function 'getgrgid_r' is invalid in C99 [-Werror,-Wimplicit-function-declaration] [/home/carlos/runtime/src/native/libs/build-native.proj]
/home/carlos/runtime/src/native/libs/build-native.proj(40,5): error MSB3073: The command ""/home/carlos/runtime/src/native/libs/build-native.sh" x64 Debug outconfig net7.0-Android-Debug-x64 -os Android " exited with code 2.
The method is invoked here:
| if (getgrgid_r(gid, &gr, buffer, bufferLength, &result) == 0) |
According to its man page, the two required includes are sys/types.h and grp.h, which are already included at the top of that same file.
I was able to repro locally. I'll work on a fix tomorrow morning.