qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] Fix compilation with missing inotify_init1
@ 2010-03-28  9:44 Stefan Weil
  2010-03-31 19:45 ` [Qemu-devel] " Stefan Weil
  2010-04-01 19:52 ` [Qemu-devel] " Aurelien Jarno
  0 siblings, 2 replies; 3+ messages in thread
From: Stefan Weil @ 2010-03-28  9:44 UTC (permalink / raw)
  To: QEMU Developers; +Cc: Riku Voipio, Aurelien Jarno

Commit c05c7a7306a23a4b01d1606172b142c45caffc92
breaks cross compilation for mips (and other
compilations without CONFIG_INOTIFY1):

make[1]: Entering directory `/qemu/bin/mips'
  CC    i386-linux-user/syscall.o
cc1: warnings being treated as errors
/qemu/linux-user/syscall.c: In function ‘do_syscall’:
/qemu/linux-user/syscall.c:7067: error: implicit declaration of function ‘sys_inotify_init1’

Cc: Riku Voipio <riku.voipio@nokia.com>
Cc: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
---
 linux-user/syscall.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 29c9c09..aa3cbb8 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -7062,11 +7062,13 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
         ret = get_errno(sys_inotify_init());
         break;
 #endif
+#ifdef CONFIG_INOTIFY1
 #if defined(TARGET_NR_inotify_init1) && defined(__NR_inotify_init1)
     case TARGET_NR_inotify_init1:
         ret = get_errno(sys_inotify_init1(arg1));
         break;
 #endif
+#endif
 #if defined(TARGET_NR_inotify_add_watch) && defined(__NR_inotify_add_watch)
     case TARGET_NR_inotify_add_watch:
         p = lock_user_string(arg2);
-- 
1.7.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [Qemu-devel] Re: [PATCH] Fix compilation with missing inotify_init1
  2010-03-28  9:44 [Qemu-devel] [PATCH] Fix compilation with missing inotify_init1 Stefan Weil
@ 2010-03-31 19:45 ` Stefan Weil
  2010-04-01 19:52 ` [Qemu-devel] " Aurelien Jarno
  1 sibling, 0 replies; 3+ messages in thread
From: Stefan Weil @ 2010-03-31 19:45 UTC (permalink / raw)
  To: Aurelien Jarno; +Cc: Riku Voipio, QEMU Developers

Stefan Weil schrieb:
> Commit c05c7a7306a23a4b01d1606172b142c45caffc92
> breaks cross compilation for mips (and other
> compilations without CONFIG_INOTIFY1):
>
> make[1]: Entering directory `/qemu/bin/mips'
> CC i386-linux-user/syscall.o
> cc1: warnings being treated as errors
> /qemu/linux-user/syscall.c: In function ‘do_syscall’:
> /qemu/linux-user/syscall.c:7067: error: implicit declaration of
> function ‘sys_inotify_init1’
>
> Cc: Riku Voipio <riku.voipio@nokia.com>
> Cc: Aurelien Jarno <aurelien@aurel32.net>
> Signed-off-by: Stefan Weil <weil@mail.berlios.de>
> ---
> linux-user/syscall.c | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/linux-user/syscall.c b/linux-user/syscall.c
> index 29c9c09..aa3cbb8 100644
> --- a/linux-user/syscall.c
> +++ b/linux-user/syscall.c
> @@ -7062,11 +7062,13 @@ abi_long do_syscall(void *cpu_env, int num,
> abi_long arg1,
> ret = get_errno(sys_inotify_init());
> break;
> #endif
> +#ifdef CONFIG_INOTIFY1
> #if defined(TARGET_NR_inotify_init1) && defined(__NR_inotify_init1)
> case TARGET_NR_inotify_init1:
> ret = get_errno(sys_inotify_init1(arg1));
> break;
> #endif
> +#endif
> #if defined(TARGET_NR_inotify_add_watch) &&
> defined(__NR_inotify_add_watch)
> case TARGET_NR_inotify_add_watch:
> p = lock_user_string(arg2);



Hi,

to reproduce this error, you can proceed like this:

Debian with
* linux-libc-dev-2.6.32-10 (/usr/include/asm/unistd_32.h defines
__NR_inotify_init1)
* libc6-dev-2.7-18lenny2 (/usr/include/sys/inotify.h does not declare
inotify_init1)

Run configure --target-list=i386-linux-user && make.

Regards,
Stefan

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH] Fix compilation with missing inotify_init1
  2010-03-28  9:44 [Qemu-devel] [PATCH] Fix compilation with missing inotify_init1 Stefan Weil
  2010-03-31 19:45 ` [Qemu-devel] " Stefan Weil
@ 2010-04-01 19:52 ` Aurelien Jarno
  1 sibling, 0 replies; 3+ messages in thread
From: Aurelien Jarno @ 2010-04-01 19:52 UTC (permalink / raw)
  To: Stefan Weil; +Cc: Riku Voipio, QEMU Developers

On Sun, Mar 28, 2010 at 11:44:41AM +0200, Stefan Weil wrote:
> Commit c05c7a7306a23a4b01d1606172b142c45caffc92
> breaks cross compilation for mips (and other
> compilations without CONFIG_INOTIFY1):
> 
> make[1]: Entering directory `/qemu/bin/mips'
>   CC    i386-linux-user/syscall.o
> cc1: warnings being treated as errors
> /qemu/linux-user/syscall.c: In function ‘do_syscall’:
> /qemu/linux-user/syscall.c:7067: error: implicit declaration of function ‘sys_inotify_init1’
> 
> Cc: Riku Voipio <riku.voipio@nokia.com>
> Cc: Aurelien Jarno <aurelien@aurel32.net>
> Signed-off-by: Stefan Weil <weil@mail.berlios.de>

Thanks, applied.

> ---
>  linux-user/syscall.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/linux-user/syscall.c b/linux-user/syscall.c
> index 29c9c09..aa3cbb8 100644
> --- a/linux-user/syscall.c
> +++ b/linux-user/syscall.c
> @@ -7062,11 +7062,13 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
>          ret = get_errno(sys_inotify_init());
>          break;
>  #endif
> +#ifdef CONFIG_INOTIFY1
>  #if defined(TARGET_NR_inotify_init1) && defined(__NR_inotify_init1)
>      case TARGET_NR_inotify_init1:
>          ret = get_errno(sys_inotify_init1(arg1));
>          break;
>  #endif
> +#endif
>  #if defined(TARGET_NR_inotify_add_watch) && defined(__NR_inotify_add_watch)
>      case TARGET_NR_inotify_add_watch:
>          p = lock_user_string(arg2);
> -- 
> 1.7.0
> 
> 
> 
> 

-- 
Aurelien Jarno	                        GPG: 1024D/F1BCDB73
aurelien@aurel32.net                 http://www.aurel32.net

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-04-01 19:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-28  9:44 [Qemu-devel] [PATCH] Fix compilation with missing inotify_init1 Stefan Weil
2010-03-31 19:45 ` [Qemu-devel] " Stefan Weil
2010-04-01 19:52 ` [Qemu-devel] " Aurelien Jarno

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).