* lib/se-context.in.h (context_t): Make it a pointer to an
incomplete type rather than an int, so that callers can initialize
it with NULL regardless of whehter --with-selinux is used.
* lib/se-context.in.h (context_new):
* lib/se-label.in.h (selabel_open): Use the equivalent of
NULL (not NULL, since that would require including <stddef.h>).
+2026-01-16 Paul Eggert <eggert@cs.ucla.edu>
+
+ selinux-h: pacify -Wzero-as-null-pointer-constant
+ * lib/se-context.in.h (context_t): Make it a pointer to an
+ incomplete type rather than an int, so that callers can initialize
+ it with NULL regardless of whehter --with-selinux is used.
+ * lib/se-context.in.h (context_new):
+ * lib/se-label.in.h (selabel_open): Use the equivalent of
+ NULL (not NULL, since that would require including <stddef.h>).
+
2026-01-15 Paul Eggert <eggert@cs.ucla.edu>
manywarnings: -Wzero-as-null-pointer-constant in C
#endif
-typedef int context_t;
+typedef struct context_t *context_t;
SE_CONTEXT_INLINE context_t
context_new (char const *_GL_UNNAMED (s))
- { errno = ENOTSUP; return 0; }
+ { errno = ENOTSUP; return (void *) 0; }
SE_CONTEXT_INLINE char *
context_str (context_t _GL_UNNAMED (con))
{ errno = ENOTSUP; return (void *) 0; }
selabel_open (int _GL_UNNAMED (backend),
struct selinux_opt *_GL_UNNAMED (options),
unsigned _GL_UNNAMED (nopt))
-{ errno = ENOTSUP; return 0; }
+{ errno = ENOTSUP; return (void *) 0; }
SE_LABEL_INLINE void
selabel_close (struct selabel_handle *_GL_UNNAMED (hnd))