summaryrefslogtreecommitdiff
path: root/dir.c
diff options
context:
space:
mode:
authorBenoit Daloze <eregontp@gmail.com>2021-04-29 15:12:44 +0200
committerBenoit Daloze <eregontp@gmail.com>2021-05-04 14:56:55 +0200
commit0764d323d8908c1682f3ab654c48783438a88a54 (patch)
treee335e7f8f9c3a4d8a6c14bdce81af07102244ad7 /dir.c
parentfa7a712d460dc904f8a836bb22b54d457d95ba8e (diff)
Fix -Wundef warnings for patterns `#if HAVE`
* See [Feature #17752] * Using this to detect them: git grep -P 'if\s+HAVE' | grep -Pv 'HAVE_LONG_LONG|/ChangeLog|HAVE_TYPEOF'
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/4428
Diffstat (limited to 'dir.c')
-rw-r--r--dir.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/dir.c b/dir.c
index fb31bd4f22..b122b2cb90 100644
--- a/dir.c
+++ b/dir.c
@@ -50,13 +50,13 @@
# define dirent direct
# define NAMLEN(dirent) (dirent)->d_namlen
# define HAVE_DIRENT_NAMLEN 1
-# if HAVE_SYS_NDIR_H
+# ifdef HAVE_SYS_NDIR_H
# include <sys/ndir.h>
# endif
-# if HAVE_SYS_DIR_H
+# ifdef HAVE_SYS_DIR_H
# include <sys/dir.h>
# endif
-# if HAVE_NDIR_H
+# ifdef HAVE_NDIR_H
# include <ndir.h>
# endif
# ifdef _WIN32