libnss-cache: update to 0.17.
This commit is contained in:
parent
4cdf5731b8
commit
9d63849b8f
2 changed files with 4 additions and 99 deletions
|
@ -1,92 +0,0 @@
|
||||||
diff --git compat/getgrent_r.c compat/getgrent_r.c
|
|
||||||
index 1d20465..863413f 100644
|
|
||||||
--- compat/getgrent_r.c
|
|
||||||
+++ compat/getgrent_r.c
|
|
||||||
@@ -26,9 +26,9 @@
|
|
||||||
* Copyright © 2015 Kevin Bowling <k@kev009.com>
|
|
||||||
*/
|
|
||||||
|
|
||||||
-#include <sys/param.h>
|
|
||||||
-
|
|
||||||
-#ifdef BSD
|
|
||||||
+// This compat layer is only built for BSD, or Linux without the GNU C
|
|
||||||
+// Library.
|
|
||||||
+#if defined(BSD) || (defined(__linux__) && !defined(__GLIBC__))
|
|
||||||
|
|
||||||
#include <grp.h>
|
|
||||||
#include <stddef.h>
|
|
||||||
@@ -37,6 +37,16 @@
|
|
||||||
#include <errno.h>
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
+#if defined(BSD)
|
|
||||||
+#include <sys/param.h>
|
|
||||||
+#else
|
|
||||||
+// This branch is necessarily Linux and not GNU because of the checks
|
|
||||||
+// defined above that guard the rest of the compat layer. On Linux we
|
|
||||||
+// don't pull in param.h as it is very obsolete.
|
|
||||||
+#include <stdint.h>
|
|
||||||
+#define ALIGNBYTES _Alignof(max_align_t)
|
|
||||||
+#define ALIGN(p)(((uintptr_t)(p) + ALIGNBYTES & ~ALIGNBYTES))
|
|
||||||
+#endif // defined(BSD)
|
|
||||||
static unsigned atou(char **s)
|
|
||||||
{
|
|
||||||
unsigned x;
|
|
||||||
@@ -104,5 +114,4 @@ end:
|
|
||||||
if(rv) errno = rv;
|
|
||||||
return rv;
|
|
||||||
}
|
|
||||||
-
|
|
||||||
-#endif // ifdef BSD
|
|
||||||
+#endif //#if defined(BSD) || defined(__LINUX__) && !defined(__GLIBC__)
|
|
||||||
diff --git compat/getpwent_r.c compat/getpwent_r.c
|
|
||||||
index b1be6fc..de785a6 100644
|
|
||||||
--- compat/getpwent_r.c
|
|
||||||
+++ compat/getpwent_r.c
|
|
||||||
@@ -26,9 +26,9 @@
|
|
||||||
* Copyright © 2015 Kevin Bowling <k@kev009.com>
|
|
||||||
*/
|
|
||||||
|
|
||||||
-#include <sys/param.h>
|
|
||||||
-
|
|
||||||
-#ifdef BSD
|
|
||||||
+// This compat layer is only built for BSD, or Linux without the GNU C
|
|
||||||
+// Library.
|
|
||||||
+#if defined(BSD) || (defined(__linux__) && !defined(__GLIBC__))
|
|
||||||
|
|
||||||
#include <pwd.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
@@ -83,5 +83,4 @@ int fgetpwent_r(FILE *f, struct passwd *pw, char *line, size_t size, struct pass
|
|
||||||
if (rv) errno = rv;
|
|
||||||
return rv;
|
|
||||||
}
|
|
||||||
-
|
|
||||||
-#endif // ifdef BSD
|
|
||||||
+#endif //#if defined(BSD) || defined(__LINUX__) && !defined(__GLIBC__)
|
|
||||||
diff --git nss_cache.c nss_cache.c
|
|
||||||
index 0cd113b..aabc0ef 100644
|
|
||||||
--- nss_cache.c
|
|
||||||
+++ nss_cache.c
|
|
||||||
@@ -730,7 +730,10 @@ enum nss_status _nss_cache_getgrnam_r(const char *name, struct group *result,
|
|
||||||
//
|
|
||||||
// Routines for shadow map defined here.
|
|
||||||
//
|
|
||||||
-#ifndef BSD
|
|
||||||
+#if defined(__LINUX__) && defined(__GLIBC__)
|
|
||||||
+// This is only built on GLIBC as caching the shadow file is generally
|
|
||||||
+// not permissable from the perspective of other libc's, so the
|
|
||||||
+// symbols are simply unused in those environments.
|
|
||||||
|
|
||||||
// _nss_cache_setspent_path()
|
|
||||||
// Helper function for testing
|
|
||||||
@@ -915,6 +918,8 @@ enum nss_status _nss_cache_getspnam_r(const char *name, struct spwd *result,
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
-#else
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
+#ifdef BSD
|
|
||||||
#include "bsdnss.c"
|
|
||||||
-#endif // ifndef BSD
|
|
||||||
+#endif // #if defined(__LINUX__) && defined(__GLIBC__)
|
|
|
@ -1,16 +1,17 @@
|
||||||
# Template file for 'libnss-cache'
|
# Template file for 'libnss-cache'
|
||||||
pkgname=libnss-cache
|
pkgname=libnss-cache
|
||||||
version=0.16
|
version=0.17
|
||||||
revision=2
|
revision=1
|
||||||
wrksrc=$pkgname-version-$version
|
wrksrc=$pkgname-version-$version
|
||||||
build_style=gnu-makefile
|
build_style=gnu-makefile
|
||||||
make_use_env=1
|
make_use_env=1
|
||||||
|
checkdepends="time"
|
||||||
short_desc="NSS module for reading directory information from local cache"
|
short_desc="NSS module for reading directory information from local cache"
|
||||||
maintainer="Michael Aldridge <maldridge@voidlinux.org>"
|
maintainer="Michael Aldridge <maldridge@voidlinux.org>"
|
||||||
license="LGPL-3.0"
|
license="LGPL-3.0"
|
||||||
homepage="https://github.com/google/libnss-cache"
|
homepage="https://github.com/google/libnss-cache"
|
||||||
distfiles="https://github.com/google/libnss-cache/archive/version/$version.tar.gz"
|
distfiles="https://github.com/google/libnss-cache/archive/version/$version.tar.gz"
|
||||||
checksum=09099ce2a3becb9cc4c282f7809198ac9707929dbc767030e32da8b824110bfe
|
checksum=3777cbc46dc8d08144b99321d1f039718cd347d3be8ed66a8cb3722d3e6692f5
|
||||||
|
|
||||||
case "$XBPS_TARGET_MACHINE" in
|
case "$XBPS_TARGET_MACHINE" in
|
||||||
*musl)
|
*musl)
|
||||||
|
@ -18,10 +19,6 @@ case "$XBPS_TARGET_MACHINE" in
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
do_check() {
|
|
||||||
: # https://github.com/google/libnss-cache/issues/10
|
|
||||||
}
|
|
||||||
|
|
||||||
pre_install() {
|
pre_install() {
|
||||||
sed -i 's:$(LIBDIR):${DESTDIR}/usr/lib:' Makefile
|
sed -i 's:$(LIBDIR):${DESTDIR}/usr/lib:' Makefile
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue