summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2021-02-04 11:18:05 +0100
committerRobert Ancell <robert.ancell@gmail.com>2021-02-15 15:32:33 +1300
commit270b3bfcf84939ab2d71db3f3470cffd36816852 (patch)
tree4400eef98dae5c1296b2065434177a46e4c914b9
parent97dc99a3a7a20ecf4db15b9536bd82a79078a8d5 (diff)
downloadlightdm-git-270b3bfcf84939ab2d71db3f3470cffd36816852.tar.gz
Glibc 2.33 fix.
The library does not declare __fxstatat64 and friends in a header file. Thus the following warning appears: ``` libsystem.c:333:1: error: no previous prototype for '__xstat' [-Werror=missing-prototypes] 333 | __xstat (int version, const char *path, struct stat *buf) | ^~~~~~~ libsystem.c:342:1: error: no previous prototype for '__xstat64' [-Werror=missing-prototypes] 342 | __xstat64 (int version, const char *path, struct stat64 *buf) | ^~~~~~~~~ libsystem.c:351:1: error: no previous prototype for '__fxstatat' [-Werror=missing-prototypes] 351 | __fxstatat(int ver, int dirfd, const char *pathname, struct stat *buf, int flags) | ^~~~~~~~~~ libsystem.c:360:1: error: no previous prototype for '__fxstatat64' [-Werror=missing-prototypes] 360 | __fxstatat64(int ver, int dirfd, const char *pathname, struct stat64 *buf, int flags) | ^~~~~~~~~~~~ ``` Fixed #167.
-rw-r--r--tests/src/libsystem.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/src/libsystem.c b/tests/src/libsystem.c
index b47b4523..aed3b8cf 100644
--- a/tests/src/libsystem.c
+++ b/tests/src/libsystem.c
@@ -329,6 +329,10 @@ stat64 (const char *path, struct stat64 *buf)
return _stat64 (new_path, buf);
}
+// glibc 2.33 and newer does not declare these functions in a header file
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wmissing-prototypes"
+
int
__xstat (int version, const char *path, struct stat *buf)
{
@@ -365,6 +369,8 @@ __fxstatat64(int ver, int dirfd, const char *pathname, struct stat64 *buf, int f
return ___fxstatat64 (ver, dirfd, new_path, buf, flags);
}
+#pragma GCC diagnostic pop
+
DIR *
opendir (const char *name)
{