* lib/xgetdomainname.h: Include <stdlib.h>.
(xgetdomainname): Declare that deallocation must happen through 'free'.
+2021-08-07 Bruno Haible <bruno@clisp.org>
+
+ xgetdomainname: Improve GCC 11 allocation-deallocation checking.
+ * lib/xgetdomainname.h: Include <stdlib.h>.
+ (xgetdomainname): Declare that deallocation must happen through 'free'.
+
2021-08-07 Bruno Haible <bruno@clisp.org>
xgetdomainname: Ensure .c file starts with '#include <config.h>'.
#ifndef _XGETDOMAINNAME_H
#define _XGETDOMAINNAME_H
+#include <stdlib.h>
+
/* Return the NIS domain name of the machine, in malloc'd storage.
WARNING! The NIS domain name is unrelated to the fully qualified host name
of the machine. It is also unrelated to email addresses.
not using NIS.
If malloc fails, exit.
Upon any other failure, set errno and return NULL. */
-extern char *xgetdomainname (void);
+extern char *xgetdomainname (void)
+ _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE;
#endif /* _XGETDOMAINNAME_H */