wait_for_something.c -> sysdeps/linux-gnu/events.c
diff --git a/Makefile.in b/Makefile.in
index 4f96fee..372ccb9 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -25,10 +25,9 @@
 INSTALL_SCRIPT	=	$(INSTALL) -p    -m  755
 INSTALL_DIR	=	$(INSTALL) -p -d -m  755
 
-OBJ	=	ltrace.o options.o elf.o output.o read_config_file.o	\
-		execute_program.o wait_for_something.o process_event.o	\
-		display_args.o breakpoints.o proc.o demangle.o dict.o \
-		debug.o summary.o
+OBJ	=	ltrace.o options.o elf.o output.o read_config_file.o     \
+		execute_program.o process_event.o display_args.o         \
+		breakpoints.o proc.o demangle.o dict.o debug.o summary.o
 
 VERSION	=	@PACKAGE_VERSION@
 
diff --git a/ltrace.c b/ltrace.c
index 5877bfc..b76865f 100644
--- a/ltrace.c
+++ b/ltrace.c
@@ -126,6 +126,6 @@
 		opt_p_tmp = opt_p_tmp->next;
 	}
 	while (1) {
-		process_event(wait_for_something());
+		process_event(next_event());
 	}
 }
diff --git a/ltrace.h b/ltrace.h
index c1e24c6..2677ebf 100644
--- a/ltrace.h
+++ b/ltrace.h
@@ -217,7 +217,7 @@
 
 extern void *instruction_pointer;
 
-extern struct event *wait_for_something(void);
+extern struct event *next_event(void);
 extern struct process * pid2proc(pid_t pid);
 extern void process_event(struct event *event);
 extern void execute_program(struct process *, char **);
diff --git a/sysdeps/README b/sysdeps/README
index 9876548..50b2df3 100644
--- a/sysdeps/README
+++ b/sysdeps/README
@@ -10,6 +10,7 @@
 -----------
 "sysdep.o" must export the following functions:
 
+struct event * next_event(void);
 void continue_after_breakpoint(struct process * proc, struct breakpoint * sbp, int delete_it);
 void continue_after_signal(pid_t pid, int signum);
 void continue_enabling_breakpoint(pid_t pid, struct breakpoint * sbp);
diff --git a/sysdeps/linux-gnu/Makefile b/sysdeps/linux-gnu/Makefile
index 6e0eb32..3d0af14 100644
--- a/sysdeps/linux-gnu/Makefile
+++ b/sysdeps/linux-gnu/Makefile
@@ -3,7 +3,7 @@
 
 CPPFLAGS	+=	-I$(TOPDIR)/sysdeps/linux-gnu/$(ARCH)
 
-OBJ		=	trace.o proc.o breakpoint.o
+OBJ		=	events.o trace.o proc.o breakpoint.o
 
 all:		sysdep.h signalent.h syscallent.h arch_syscallent.h signalent1.h syscallent1.h ../sysdep.o
 
diff --git a/wait_for_something.c b/sysdeps/linux-gnu/events.c
similarity index 98%
rename from wait_for_something.c
rename to sysdeps/linux-gnu/events.c
index e772e92..afe6a96 100644
--- a/wait_for_something.c
+++ b/sysdeps/linux-gnu/events.c
@@ -17,7 +17,7 @@
 static struct event event;
 
 struct event *
-wait_for_something(void) {
+next_event(void) {
 	pid_t pid;
 	int status;
 	int tmp;
diff --git a/sysdeps/linux-gnu/mipsel/trace.c b/sysdeps/linux-gnu/mipsel/trace.c
index c65f9ec..c4d2a09 100644
--- a/sysdeps/linux-gnu/mipsel/trace.c
+++ b/sysdeps/linux-gnu/mipsel/trace.c
@@ -31,7 +31,7 @@
 /**
    \param proc The process that had an event. 
 
-   Called by \c wait_for_something() right after the return from wait.
+   Called by \c next_event() right after the return from wait.
 
    Most targets just return here. A couple use proc->arch_ptr for a
    private data area.
@@ -46,7 +46,7 @@
    \param sysnum 0-based syscall number. 
    \return 1 if syscall, 2 if sysret, 0 otherwise.
 
-   Called by \c wait_for_something() after the call to get_arch_dep()
+   Called by \c next_event() after the call to get_arch_dep()
 
    It seems that the ptrace call trips twice on a system call, once
    just before the system call and once when it returns. Both times,