> * tests/test-canonicalize.c: Protect the inclusion of null-ptr.h
> with the same guard as that used to protect usage of the null_ptr
> function

The same thing is needed in test-ptsname_r.c:


2020-02-10  Bruno Haible  <br...@clisp.org>

        ptsname_r-tests: Avoid unused function warning.
        * tests/test-ptsname_r.c: Don't include null-ptr.h if we don't need it.

diff --git a/tests/test-ptsname_r.c b/tests/test-ptsname_r.c
index 24be52f..381e3da 100644
--- a/tests/test-ptsname_r.c
+++ b/tests/test-ptsname_r.c
@@ -36,7 +36,10 @@ SIGNATURE_CHECK (ptsname_r, int, (int, char *, size_t));
 
 #include "same-inode.h"
 
-#include "null-ptr.h"
+#if GNULIB_defined_ptsname_r
+# include "null-ptr.h"
+#endif
+
 #include "macros.h"
 
 /* Compare two slave names.


Reply via email to