Fixes for building gdbserver (and gdb) out of the box.

Bug: http://b/21695943
Change-Id: Iadb600b2ae619515d7038a4db9bf464ba31adb36
diff --git a/libc/include/sys/wait.h b/libc/include/sys/wait.h
index 8d9a5f6..12b7308 100644
--- a/libc/include/sys/wait.h
+++ b/libc/include/sys/wait.h
@@ -45,6 +45,9 @@
 #define WIFSTOPPED(s)   (WTERMSIG(s) == 0x7f)
 #define WIFSIGNALED(s)  (WTERMSIG((s)+1) >= 2)
 
+#define W_EXITCODE(ret, sig)    ((ret) << 8 | (sig))
+#define W_STOPCODE(sig)         ((sig) << 8 | 0x7f)
+
 extern pid_t  wait(int *);
 extern pid_t  waitpid(pid_t, int *, int);
 extern pid_t  wait4(pid_t, int *, int, struct rusage *);