Skip to content

Instantly share code, notes, and snippets.

@skull-squadron
Created November 28, 2023 23:22
Show Gist options
  • Save skull-squadron/5616c938cca7d7cfe5932b7c18b90e6a to your computer and use it in GitHub Desktop.
Save skull-squadron/5616c938cca7d7cfe5932b7c18b90e6a to your computer and use it in GitHub Desktop.
checkinstall glibc 2.33+ fix
diff --git a/installwatch/installwatch.c b/installwatch/installwatch.c
index 15cb75c..77189dc 100644
--- a/installwatch/installwatch.c
+++ b/installwatch/installwatch.c
@@ -157,6 +157,20 @@ static int (*true_unlinkat)(int, const char *, int);
#define inline
#endif
+#ifndef _STAT_VER
+ #if defined (__aarch64__)
+ #define _STAT_VER 0
+ #elif defined (__x86_64__)
+ #define _STAT_VER 1
+ #else
+ #define _STAT_VER 3
+ #endif
+#endif
+
+#ifndef _MKNOD_VER
+ #define _MKNOD_VER 0
+#endif
+
static inline int true_stat(const char *pathname,struct stat *info) {
return true_xstat(_STAT_VER,pathname,info);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment