Skip to content

Instantly share code, notes, and snippets.

@bindiego
Created May 29, 2023 12:55
Show Gist options
  • Save bindiego/f98c36df023991bea3bf27771ff68d2d to your computer and use it in GitHub Desktop.
Save bindiego/f98c36df023991bea3bf27771ff68d2d to your computer and use it in GitHub Desktop.
Check glibc version
#include <stdio.h>
#include <stdlib.h>
#include <gnu/libc-version.h>
int main(int argc, char *argv[])
{
// Print glibc version
printf("GNU libc version: %s\n", gnu_get_libc_version());
exit(EXIT_SUCCESS);
}
build:
g++ -std=c++11 glibc.c -o glibc
run: build
./glibc
.PHONY: run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment