Add a SYS_write definition on systems where it is not defined in headers

Namely, in the Android NDK headers, SYS_write is not defined; but
__NR_write is.
This commit is contained in:
Mike Hommey
2012-03-27 14:48:58 +02:00
committed by Jason Evans
parent e77fa59ece
commit 1a0e777024
2 changed files with 13 additions and 0 deletions

View File

@@ -1,6 +1,9 @@
#include <sys/mman.h>
#include <sys/param.h>
#include <sys/syscall.h>
#if !defined(SYS_write) && defined(__NR_write)
#define SYS_write __NR_write
#endif
#include <sys/time.h>
#include <sys/types.h>
#include <sys/uio.h>