Browse Source

fix compile errors with alpha

Waldemar Brodkorb 6 years ago
parent
commit
240000f893
2 changed files with 11 additions and 1 deletions
  1. 7 1
      test/misc/tst-syscall0.c
  2. 4 0
      test/misc/tst-syscall6.c

+ 7 - 1
test/misc/tst-syscall0.c

@@ -2,10 +2,16 @@
 #include <unistd.h>
 #include <sys/syscall.h>
 
+#ifndef SYS_getpid
+#define _SYS_call0 SYS_getxpid
+#else
+#define _SYS_call0 SYS_getpid
+#endif
+
 int main() {
 	int pid;
 
-	pid = syscall(SYS_getpid);
+	pid = syscall(_SYS_call0);
    	if (pid > 0) {
 		printf("syscall(SYS_getpid) says %d\n", pid);
      		return 0;

+ 4 - 0
test/misc/tst-syscall6.c

@@ -9,6 +9,7 @@
 
 int main()
 {
+#if defined SYS_preadv2 && defined SYS_pwritev2
 	char tmp[] = "/tmp/tst-preadv2-XXXXXX";
 	int fd;
 	struct iovec iov[2];
@@ -58,4 +59,7 @@ int main()
 	}
 
 	return 0;
+#else
+  return 23;
+#endif
 }