Subject: Re: misc/openoffice, NetBSD 3.99.3, getpwent_r redeclaration
To: Ronald van der Pol <Ronald.vanderPol@rvdp.org>
From: Roland Illig <roland.illig@gmx.de>
List: tech-pkg
Date: 04/07/2005 13:20:06
This is a multi-part message in MIME format.
--------------060702070101090702000000
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
> system.h:575: error: conflicting types for `getpwent_r'
> /usr/include/pwd.h:136: error: previous declaration of `getpwent_r'
> dmake: Error code 1, while making '../../unxbsdi2.pro/obj/conditn.obj'
Please try this patch.
Roland
--------------060702070101090702000000
Content-Type: text/plain;
name="patch-aw"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="patch-aw"
$NetBSD: patch-aw,v 1.6 2005/01/03 22:51:47 agc Exp $
Patch from Rui-Xiang Guo for building on NetBSD-current. The getpwent_r
function is not used at all, so why provide a prototype for it?
--- ../sal/osl/unx/system.h.orig 2004-11-19 09:23:53.000000000 +0800
+++ ../sal/osl/unx/system.h 2004-11-19 09:27:55.000000000 +0800
@@ -169,7 +169,10 @@
#endif
#ifdef NETBSD
+# include <sys/param.h>
+# ifndef ETIME
# define ETIME ETIMEDOUT
+# endif
# define _POSIX_THREAD_SYSCALL_SOFT 1
# include <pthread.h>
# include <netdb.h>
@@ -569,7 +572,6 @@ extern int sem_post(sem_t* sem);
#ifdef NO_PTHREAD_RTL
#if !defined FREEBSD || (__FreeBSD_version < 500112)
-struct passwd *getpwent_r(struct passwd *pwd, char *buffer, int buflen);
extern struct spwd *getspnam_r(const char *name, struct spwd *result,
char *buffer, int buflen);
--------------060702070101090702000000--