diff options
author | KO Myung-Hun <komh78@gmail.com> | 2021-01-19 19:23:39 +0100 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2021-01-19 19:24:24 +0100 |
commit | 9cd9d63152f3368c55432b3a2aec6f90ddd062d0 (patch) | |
tree | c6b3615c30398192a9c0fde236a0c5cdf9b1eb88 /lib/dirent.in.h | |
parent | 70e3c12fb708a02c2326d571e11ae53aef8c45f0 (diff) | |
download | gnulib-9cd9d63152f3368c55432b3a2aec6f90ddd062d0.tar.gz |
dirent: Fix compilation error in C++ mode on OS/2 kLIBC.
* lib/dirent.in.h (dirfd): Redefine dirfd macro as a rpl function
always.
Diffstat (limited to 'lib/dirent.in.h')
-rw-r--r-- | lib/dirent.in.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/dirent.in.h b/lib/dirent.in.h index 2e2c5119a1..4666972b15 100644 --- a/lib/dirent.in.h +++ b/lib/dirent.in.h @@ -154,7 +154,8 @@ _GL_WARN_ON_USE (closedir, "closedir is not portable - " /* 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 |