Created
May 5, 2017 09:37
-
-
Save tombooth/bbfd689d766081ba8ebe49dfb32993e6 to your computer and use it in GitHub Desktop.
Different UTS_VERSION and uname -v
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
gcc -I/lib/modules/$(uname -r)/build/include demo.c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <generated/compile.h> | |
#include <sys/utsname.h> | |
int main(int argc, void* argv) { | |
struct utsname uts; | |
uname(&uts); | |
printf("UTS_VERSION: %s\nuname version: %s\n", UTS_VERSION, uts.version); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment