Skip to contentSkip to conversation

cldap_ping.c: add missing <sys/types.h> include

PATCH In review Thomas Petazzoni 2 participants 2 messages Dec 26, 2024 – Jan 20, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cldap_ping.c: add missing <sys/types.h> include

Fixes:

cldap_ping.c: In function ‘read_dns_string’:
cldap_ping.c:72:37: error: ‘u_char’ undeclared (first use in this function)

when building with the musl C library, but even with glibc u_char is defined in <sys/types.h>, it happens to work with glibc <sys/types.h> gets included by another header.

---
 cldap_ping.c | 1 +
 1 file changed, 1 insertion(+)
cldap_ping.c +1 -0
index 9183b27..a603be3 100644
@@ -20,6 +20,7 @@
 #include <talloc.h>
 #include <string.h>
 #include <sys/socket.h>
+#include <sys/types.h>
 #include <arpa/inet.h>
 #include <unistd.h>
 #include <resolv.h>
Signature · 1 line
2.47.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · Thomas Petazzoni

Fixes:

cldap_ping.c: In function ‘read_dns_string’:
cldap_ping.c:72:37: error: ‘u_char’ undeclared (first use in this function)

Quoted 8 lines

when building with the musl C library, but even with glibc u_char is defined in <sys/types.h>, it happens to work with glibc <sys/types.h> gets included by another header.

---
 cldap_ping.c | 1 +
 1 file changed, 1 insertion(+)