NetBSD Problem Report #50440
From www@NetBSD.org Tue Nov 17 09:59:32 2015
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
by mollari.NetBSD.org (Postfix) with ESMTPS id 91B51A6552
for <gnats-bugs@gnats.NetBSD.org>; Tue, 17 Nov 2015 09:59:32 +0000 (UTC)
Message-Id: <20151117095931.3E34EA65BE@mollari.NetBSD.org>
Date: Tue, 17 Nov 2015 09:59:31 +0000 (UTC)
From: root@zta.lk
Reply-To: root@zta.lk
To: gnats-bugs@NetBSD.org
Subject: sysutils/bsdinstall doesn't build on Darwin
X-Send-Pr-Version: www-1.0
>Number: 50440
>Category: pkg
>Synopsis: sysutils/bsdinstall doesn't build on Darwin
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: bsiegert
>State: closed
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Tue Nov 17 10:00:00 +0000 2015
>Closed-Date: Mon Dec 28 15:43:13 +0000 2015
>Last-Modified: Mon Dec 28 15:43:13 +0000 2015
>Originator: Aleksej Lebedev
>Release: HEAD
>Organization:
Tomtom
>Environment:
Darwin zhtw-mac.ttg.global 14.5.0 Darwin Kernel Version 14.5.0: Wed Jul 29 02:26:53 PDT 2015; root:xnu-2782.40.9~1/RELEASE_X86_64 x86_64
>Description:
# pwd
/usr/pkgsrc/sysutils/bsdinstall
# bmake package install clean
...
===> Building for bsdinstall-20130905
clang -O2 -Werror -D_PATH_DEVNULL=\"/dev/null\" -DTARGET_STRIP=\"/usr/bin/strip\" -DHAVE_NBCOMPAT_H=1 -I/var/tmp/pkgsrc-obj/sysutils/bsdinstall/work/libnbcompat -c bsdinstall.c
bsdinstall.c:351:7: error: implicit declaration of function 'gid_from_group' is invalid in C99
[-Werror,-Wimplicit-function-declaration]
if (gid_from_group(group, &gid) == -1) {
^
bsdinstall.c:360:7: error: implicit declaration of function 'uid_from_user' is invalid in C99
[-Werror,-Wimplicit-function-declaration]
if (uid_from_user(owner, &uid) == -1) {
^
2 errors generated.
*** Error code 1
>How-To-Repeat:
Try to build bsdinstall on Darwin.
>Fix:
cvs diff: Diffing .
cvs diff: Diffing files
Index: files/bsdinstall.c
===================================================================
RCS file: /cvsroot/pkgsrc/sysutils/bsdinstall/files/bsdinstall.c,v
retrieving revision 1.2
diff -u -r1.2 bsdinstall.c
--- files/bsdinstall.c 3 Sep 2013 15:27:38 -0000 1.2
+++ files/bsdinstall.c 17 Nov 2015 09:53:25 -0000
@@ -71,14 +71,22 @@
#endif
#include <errno.h>
#include <fcntl.h>
+#if defined(HAVE_NBCOMPAT_H)
+#include <nbcompat/grp.h>
+#else
#include <grp.h>
+#endif
#include <libgen.h>
#if defined(HAVE_NBCOMPAT_H)
#include <nbcompat/paths.h>
#else
#include <paths.h>
#endif
+#if defined(HAVE_NBCOMPAT_H)
+#include <nbcompat/pwd.h>
+#else
#include <pwd.h>
+#endif
#include <stdio.h>
#if defined(HAVE_NBCOMPAT_H)
#include <nbcompat/stdlib.h>
>Release-Note:
>Audit-Trail:
From: "Jonathan Perkin" <jperkin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/50440 CVS commit: pkgsrc/sysutils/bsdinstall/files
Date: Wed, 18 Nov 2015 12:12:49 +0000
Module Name: pkgsrc
Committed By: jperkin
Date: Wed Nov 18 12:12:49 UTC 2015
Modified Files:
pkgsrc/sysutils/bsdinstall/files: bsdinstall.c
Log Message:
Pull in grp.h and pwd.h from libnbcompat, fixes implicit declaration of
gid_from_group and uid_from_user on Darwin. Fix (lightly modified by myself)
submitted by Aleksej Lebedev in PR#50440.
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 pkgsrc/sysutils/bsdinstall/files/bsdinstall.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Responsible-Changed-From-To: pkg-manager->bsiegert
Responsible-Changed-By: bsiegert@NetBSD.org
Responsible-Changed-When: Mon, 28 Dec 2015 15:43:13 +0000
Responsible-Changed-Why:
State-Changed-From-To: open->closed
State-Changed-By: bsiegert@NetBSD.org
State-Changed-When: Mon, 28 Dec 2015 15:43:13 +0000
State-Changed-Why:
Fix committed.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.