]> Savannah Git Hosting - gnulib.git/commitdiff
sys_stat: Fix 'implicit declaration of function' warning on OS/2 kLIBC.
authorKO Myung-Hun <komh78@gmail.com>
Thu, 17 Jan 2019 18:40:26 +0000 (19:40 +0100)
committerBruno Haible <bruno@clisp.org>
Thu, 17 Jan 2019 18:40:26 +0000 (19:40 +0100)
* lib/sys_stat.in.h [kLIBC]: Include <unistd.h>.

ChangeLog
lib/sys_stat.in.h

index 61f5de6dbadaa99b0a2c3daeac15869231666ac5..4e5f40c8384b722294680524688d4022f61e036e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2019-01-17  KO Myung-Hun  <komh78@gmail.com>
+
+       sys_stat: Fix 'implicit declaration of function' warning on OS/2 kLIBC.
+       * lib/sys_stat.in.h [kLIBC]: Include <unistd.h>.
+
 2019-01-17  KO Myung-Hun  <komh78@gmail.com>
 
        fcntl: Fix syntax error (regression from 2018-10-05).
index 9658dcf0b60b45b0ebc59ccc25d3a8fbbd7d3608..c8473440122e4eafc346d1273b6b673a4ce4ce6c 100644 (file)
 
 /* The definition of _GL_WARN_ON_USE is copied here.  */
 
+/* Before doing "#define mknod rpl_mknod" below, we need to include all
+   headers that may declare mknod().  OS/2 kLIBC declares mknod() in
+   <unistd.h>, not in <sys/stat.h>.  */
+#ifdef __KLIBC__
+# include <unistd.h>
+#endif
+
 /* Before doing "#define mkdir rpl_mkdir" below, we need to include all
    headers that may declare mkdir().  Native Windows platforms declare mkdir
-   in <io.h> and/or <direct.h>, not in <unistd.h>.  */
+   in <io.h> and/or <direct.h>, not in <sys/stat.h>.  */
 #if defined _WIN32 && ! defined __CYGWIN__
 # include <io.h>     /* mingw32, mingw64 */
 # include <direct.h> /* mingw64, MSVC 9 */