From: KO Myung-Hun Date: Tue, 19 Jan 2021 18:23:39 +0000 (+0100) Subject: dirent: Fix compilation error in C++ mode on OS/2 kLIBC. X-Git-Tag: v1.0~3140 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9cd9d63152f3368c55432b3a2aec6f90ddd062d0;p=thirdparty%2Fgnulib.git dirent: Fix compilation error in C++ mode on OS/2 kLIBC. * lib/dirent.in.h (dirfd): Redefine dirfd macro as a rpl function always. --- diff --git a/ChangeLog b/ChangeLog index 357c231be8..94a6b5f52c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2021-01-19 KO Myung-Hun + + 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 zerosize-ptr: Fix compilation on OS/2 kLIBC. 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