Skip to contentSkip to conversation

PATCH: fix undefined function errors

Qemu-devel Sandra Loosemore 1 participant 1 message Nov 13, 2008

lore
Share & tools
lore
#0 lore raw

I ran into errors about undefined functions when building user-mode QEMU for ARM Linux after picking up a recent update from trunk. The attached patch fixes the problem.

As I'm not a QEMU maintainer, someone who is will have to check this in.... or some alternate fix for the same problem, maybe.

-Sandra

2008-11-12 Sandra Loosemore <[email protected]>

* linux-user/syscall.c (do_syscall): Make #ifdef on TARGET_NR_inotify_init, TARGET_NR_inotify_add_watch, and TARGET_NR_inotify_rm_watch cases match that used previously in the file, to avoid references to undefined symbols.

Index: linux-user/syscall.c
===================================================================
*** linux-user/syscall.c (revision 227507)
--- linux-user/syscall.c (working copy)
*************** abi_long do_syscall(void *cpu_env, int n *** 6029,6047 ****

          ret = do_futex(arg1, arg2, arg3, arg4, arg5, arg6);
          break;
  #endif
! #ifdef TARGET_NR_inotify_init
      case TARGET_NR_inotify_init:
          ret = get_errno(sys_inotify_init());
          break;
  #endif
! #ifdef TARGET_NR_inotify_add_watch
      case TARGET_NR_inotify_add_watch:
          p = lock_user_string(arg2);
          ret = get_errno(sys_inotify_add_watch(arg1, path(p), arg3));
          unlock_user(p, arg2, 0);
          break;
  #endif
! #ifdef TARGET_NR_inotify_rm_watch
      case TARGET_NR_inotify_rm_watch:
          ret = get_errno(sys_inotify_rm_watch(arg1, arg2));
          break;
--- 6029,6047 ----
          ret = do_futex(arg1, arg2, arg3, arg4, arg5, arg6);
          break;
  #endif
! #if defined(TARGET_NR_inotify_init) && defined(__NR_inotify_init)
      case TARGET_NR_inotify_init:
          ret = get_errno(sys_inotify_init());
          break;
  #endif
! #if defined(TARGET_NR_inotify_add_watch) && defined(__NR_inotify_add_watch)
      case TARGET_NR_inotify_add_watch:
          p = lock_user_string(arg2);
          ret = get_errno(sys_inotify_add_watch(arg1, path(p), arg3));
          unlock_user(p, arg2, 0);
          break;
  #endif
! #if defined(TARGET_NR_inotify_rm_watch) && defined(__NR_inotify_rm_watch)
      case TARGET_NR_inotify_rm_watch:
          ret = get_errno(sys_inotify_rm_watch(arg1, arg2));
          break;