getport: fix missing stddef.h inclusion
Subsystems (2)
PATCH 1/1 getport: fix missing stddef.h inclusion
getport.c uses offsetof() but does not include <stddef.h>. On glibc this works because offsetof is pulled in transitively, but on musl it is not available without the explicit include, causing:
getport.c:459:41: error: implicit declaration of function 'offsetof'
Signed-off-by Jaipaul Cheernam <[email protected]>
--- support/nfs/getport.c | 1 + 1 file changed, 1 insertion(+)
support/nfs/getport.c +1 -0
@@ -27,6 +27,7 @@#endif #include <sys/types.h> +#include <stddef.h> #include <sys/time.h> #include <unistd.h> #include <fcntl.h>
Quoted 7 lines · Jaipaul Cheernam
getport.cusesoffsetof()but does not include <stddef.h>. On glibc this works because offsetof is pulled in transitively, but on musl it is not available without the explicit include, causing:getport.c:459:41: error: implicit declaration of function 'offsetof'
Signed-off-by Jaipaul Cheernam <[email protected]>
Committed... (tag: nfs-utils-2-9-3-rc1)
steved.> ---
Quoted 16 lines
support/nfs/getport.c | 1 + 1 file changed, 1 insertion(+)support/nfs/getport.c +1
-0@@ -27,6 +27,7 @@#endif #include <sys/types.h> +#include <stddef.h> #include <sys/time.h> #include <unistd.h> #include <fcntl.h>