userland: start per-directory flags with userland/gcc

This commit is contained in:
Ciro Santilli 六四事件 法轮功
2019-03-13 00:00:01 +00:00
parent a85ca696c4
commit e32dcb85e9
4 changed files with 45 additions and 17 deletions

20
userland/posix/uname.c Normal file
View File

@@ -0,0 +1,20 @@
/* https://github.com/cirosantilli/linux-kernel-module-cheat#fatal-kernel-too-old */
#define _XOPEN_SOURCE 700
#include <stdio.h>
#include <stdlib.h>
#include <sys/utsname.h>
int main(void) {
struct utsname info;
if (uname(&info) == -1) {
perror("uname");
exit(EXIT_FAILURE);
}
printf("sysname = %s\n", info.sysname );
printf("nodename = %s\n", info.nodename);
printf("release = %s\n", info.release );
printf("version = %s\n", info.version );
printf("machine = %s\n", info.machine );
return EXIT_SUCCESS;
}