nss-db with patch
Uh, I'm stupid. Here we go.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
--- nss_db-2.2/Makefile.am.bak 2000-08-15 10:18:16.000000000 -0400
+++ nss_db-2.2/Makefile.am 2002-10-23 16:43:46.000000000 -0400
@@ -14,7 +14,7 @@
noinst_HEADERS = db-compat.h netgroup.h nss_db.h
-INCLUDES = @DB_CFLAGS@ -D_LIBC -D_GNU_SOURCE
+INCLUDES = @DB_CFLAGS@ -D_GNU_SOURCE
slib_LTLIBRARIES = libnss_db.la
libnss_db_la_SOURCES = db-alias.c db-ethers.c db-netgrp.c db-grp.c db-proto.c \
--- nss_db-2.2/Makefile.in.bak 2002-10-23 16:42:30.000000000 -0400
+++ nss_db-2.2/Makefile.in 2002-10-23 16:43:46.000000000 -0400
@@ -90,7 +90,7 @@
noinst_HEADERS = db-compat.h netgroup.h nss_db.h
-INCLUDES = @DB_CFLAGS@ -D_LIBC -D_GNU_SOURCE
+INCLUDES = @DB_CFLAGS@ -D_GNU_SOURCE
slib_LTLIBRARIES = libnss_db.la
libnss_db_la_SOURCES = db-alias.c db-ethers.c db-netgrp.c db-grp.c db-proto.c db-pwd.c db-rpc.c db-service.c db-spwd.c db-compat.c db-open.c
--- nss_db-2.2/db-XXX.c.orig 2002-10-23 16:53:07.000000000 -0400
+++ nss_db-2.2/db-XXX.c 2002-10-23 16:53:43.000000000 -0400
@@ -24,7 +24,7 @@
#include <stdio.h>
#include <string.h>
-#include <bits/libc-lock.h>
+#include "libc-lock.h"
#include "nss_db.h"
--- nss_db-2.2/db-alias.c.orig 2002-10-23 16:53:11.000000000 -0400
+++ nss_db-2.2/db-alias.c 2002-10-23 16:53:42.000000000 -0400
@@ -26,7 +26,7 @@
#include <stdio.h>
#include <string.h>
-#include <bits/libc-lock.h>
+#include "libc-lock.h"
#include "nss_db.h"
--- nss_db-2.2/db-netgrp.c.orig 2002-10-23 16:53:16.000000000 -0400
+++ nss_db-2.2/db-netgrp.c 2002-10-23 16:53:43.000000000 -0400
@@ -22,7 +22,7 @@
#include <fcntl.h>
#include <netgroup.h>
#include <string.h>
-#include <bits/libc-lock.h>
+#include "libc-lock.h"
#include <paths.h>
#include "nss_db.h"
--- /dev/null 1969-12-31 19:00:00.000000000 -0500
+++ nss_db-2.2/libc-lock.h 2002-10-23 17:17:57.000000000 -0400
@@ -0,0 +1,43 @@
+/* libc-internal interface for mutex locks. LinuxThreads version.
+ Adapted for nss_db.
+ Copyright (C) 1996,1997,1998,1999,2000,2001,2002
+ Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef LIBC_LOCK_H
+#define LIBC_LOCK_H
+
+#include <pthread.h>
+
+typedef pthread_mutex_t __libc_lock_t;
+
+#if __LT_SPINLOCK_INIT == 0
+# define __libc_lock_define_initialized(CLASS,NAME) \
+ CLASS pthread_mutex_t NAME;
+#else
+# define __libc_lock_define_initialized(CLASS,NAME) \
+ CLASS pthread_mutex_t NAME = PTHREAD_MUTEX_INITIALIZER;
+#endif
+
+/* Lock the named lock variable. */
+#define __libc_lock_lock(NAME) pthread_mutex_lock (&(NAME));
+
+/* Unlock the named lock variable. */
+#define __libc_lock_unlock(NAME) pthread_mutex_unlock (&(NAME));
+
+#endif /* bits/libc-lock.h */
Reply to: