* lib/dirent.in.h (dirfd): Redefine dirfd macro as a rpl function
always.
+2021-01-19 KO Myung-Hun <komh78@gmail.com>
+
+ dirent: Fix compilation error in C++ mode on OS/2 kLIBC.
+ * lib/dirent.in.h (dirfd): Redefine dirfd macro as a rpl function
+ always.
+
2021-01-19 KO Myung-Hun <komh78@gmail.com>
zerosize-ptr: Fix compilation on OS/2 kLIBC.
/* Return the file descriptor associated with the given directory stream,
or -1 if none exists. */
# if @REPLACE_DIRFD@
-# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+/* On kLIBC, dirfd() is a macro that does not work. Undefine it. */
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) || defined dirfd
# undef dirfd
# define dirfd rpl_dirfd
# endif