-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Eric Blake wrote: > On 1/16/19 10:35 PM, KO Myung-Hun wrote: >> On OS/2 kLIBC, mknod() is declared in unistd.h. This fixes >> 'implicit declaration of function' compilation warning. >> >> * lib/mknod.c: Include unistd.h. --- lib/mknod.c | 2 ++ 1 file >> changed, 2 insertions(+) >> >> diff --git a/lib/mknod.c b/lib/mknod.c index dbbfe29c4..1d4b490ca >> 100644 --- a/lib/mknod.c +++ b/lib/mknod.c @@ -18,6 +18,8 @@ >> >> #include <config.h> >> >> +/* On OS/2 kLIBC, mknod() is declared in unistd.h. */ +#include >> <unistd.h> #include <sys/stat.h> > > This patch is wrong; it only fixes the symptom instead of the > problem, and anyone using the module would have to repeat the fix > in their own .c files. Instead, we should be fixing the gnulib > <sys/stat.h> replacement header to pull in <unistd.h> automatically > on OS/2, so that anyone using the gnulib module can use just the > POSIX header to get the declaration. > Fixed. Thanks a lot. - -- KO Myung-Hun Using Mozilla SeaMonkey 2.7.2 Under OS/2 Warp 4 for Korean with FixPak #15 In VirtualBox v4.1.32 on Intel Core i7-3615QM 2.30GHz with 8GB RAM Korean OS/2 User Community : http://www.os2.kr/ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (OS/2) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iD8DBQFcQJMFE9YstvghgroRAqYoAJ9eqZnSFKnVEo0/xK/lQF9RwDhfmwCeL+MS KKlkuDN2g0sxB0KG+gjuuT4= =7gfK -----END PGP SIGNATURE-----
From e3be94ee18a9489f4e0f09e0259d37d765634fcd Mon Sep 17 00:00:00 2001 From: KO Myung-Hun <komh@chollian.net> Date: Thu, 17 Jan 2019 13:29:30 +0900 Subject: [PATCH] sys_stat: Include <unistd.h> for mknod() on OS/2 kLIBC OS/2 kLIBC declares mknod() in <unistd.h>. This fixes 'implicit declaration of function' warning when compiling lib/mknod.c. * lib/sys_stat.in.h [kLIBC]: Include <unistd.h>. --- lib/sys_stat.in.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/sys_stat.in.h b/lib/sys_stat.in.h index 9658dcf0b..61773242b 100644 --- a/lib/sys_stat.in.h +++ b/lib/sys_stat.in.h @@ -54,6 +54,11 @@ /* The definition of _GL_WARN_ON_USE is copied here. */ +/* OS/2 kLIBC declares mknod() in <unistd.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>. */ -- 2.13.3
0001-sys_stat-Include-unistd.h-for-mknod-on-OS-2-kLIBC.patch.sig
Description: Binary data