Page MenuHomeFreeBSD

D52526.1790532956.diff
No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None

D52526.1790532956.diff

diff --git a/krb5/include/autoconf.h b/krb5/include/autoconf.h
--- a/krb5/include/autoconf.h
+++ b/krb5/include/autoconf.h
@@ -691,7 +691,18 @@
#define STDC_HEADERS 1
/* Define to 1 if strerror_r returns char *. */
+/*
+ * glibc defines two versions of strerror_r, the char* returning one is used
+ * when _GNU_SOURCE is defined.
+ */
+#if defined(__linux__) && __has_include(<features.h>)
+#include <features.h> /* get __GLIBC__ */
+#endif
+#if defined(__GLIBC__) && defined(__USE_GNU)
+#define STRERROR_R_CHAR_P 1
+#else
/* #undef STRERROR_R_CHAR_P */
+#endif
/* Define if sys_errlist is defined in errno.h */
#define SYS_ERRLIST_DECLARED 1
diff --git a/tools/build/mk/Makefile.boot b/tools/build/mk/Makefile.boot
--- a/tools/build/mk/Makefile.boot
+++ b/tools/build/mk/Makefile.boot
@@ -38,6 +38,8 @@
# bsd.sys.mk explicitly turns on -Wsystem-headers, but that's extremely
# noisy when building on Linux.
CWARNFLAGS+= -Wno-system-headers
+# Catch mismatched int/pointer types (e.g. glibc's char* strerror_r prototype)
+CWARNFLAGS+= -Werror=int-conversion
CWARNFLAGS.clang+=-Werror=incompatible-pointer-types-discards-qualifiers
# b64_pton and b64_ntop is in libresolv on MacOS and Linux:

File Metadata

Mime Type
text/plain
Expires
Sun, Sep 27, 6:15 PM (12 h, 11 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29957517
Default Alt Text
D52526.1790532956.diff (1 KB)

Event Timeline