pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/pkgtools/libnbcompat/files
Module Name: pkgsrc
Committed By: tnn
Date: Mon Aug 5 10:57:08 UTC 2024
Modified Files:
pkgsrc/pkgtools/libnbcompat/files: lchflags.c
Log Message:
libnbcompat: fix chflags(2) issue on Linux
Linux does not have the chflags(2) syscall. Some versions of libc
have a stub that just returns ENOSYS. Not all versions of libc
have this stub so just avoid the potentially missing symbol
and return ENOSYS directly on Linux.
To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 pkgsrc/pkgtools/libnbcompat/files/lchflags.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/pkgtools/libnbcompat/files/lchflags.c
diff -u pkgsrc/pkgtools/libnbcompat/files/lchflags.c:1.4 pkgsrc/pkgtools/libnbcompat/files/lchflags.c:1.5
--- pkgsrc/pkgtools/libnbcompat/files/lchflags.c:1.4 Tue Apr 29 05:46:08 2008
+++ pkgsrc/pkgtools/libnbcompat/files/lchflags.c Mon Aug 5 10:57:08 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: lchflags.c,v 1.4 2008/04/29 05:46:08 martin Exp $ */
+/* $NetBSD: lchflags.c,v 1.5 2024/08/05 10:57:08 tnn Exp $ */
/*-
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -35,6 +35,8 @@
#include <nbcompat.h>
#include <nbcompat/stat.h>
#include <nbcompat/unistd.h>
+#include <errno.h>
+
int
lchflags(const char *path, unsigned long flags)
@@ -46,5 +48,9 @@ lchflags(const char *path, unsigned long
if (S_ISLNK(psb.st_mode)) {
return 0;
}
+#if defined(__linux__)
+ return ENOSYS;
+#else
return (chflags(path, flags));
+#endif
}
Home |
Main Index |
Thread Index |
Old Index