Skip to content

Instantly share code, notes, and snippets.

@tombooth
Created May 5, 2017 09:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tombooth/bbfd689d766081ba8ebe49dfb32993e6 to your computer and use it in GitHub Desktop.
Save tombooth/bbfd689d766081ba8ebe49dfb32993e6 to your computer and use it in GitHub Desktop.
Different UTS_VERSION and uname -v
#!/bin/sh
gcc -I/lib/modules/$(uname -r)/build/include demo.c
#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