Skip to content
Permalink
Browse files

add missing patch - thanks to jbj and pmoura@di.ubi.pt

git-svn-id: https://svn.macports.org/repository/macports/trunk/dports@17181 d073be05-634f-4543-b044-5fe20cf6d1d6
  • Loading branch information
Ole Guldberg Jensen
Ole Guldberg Jensen committed Mar 26, 2006
1 parent a45b9ee commit f02760a621683b6fd8af298368957e291ca72a7e
Showing with 45 additions and 0 deletions.
  1. +45 −0 sysutils/rpm/files/patch-lib-rpmds
@@ -0,0 +1,45 @@
Index: lib/rpmds.c
===================================================================
RCS file: /cvs/devel/rpm/lib/rpmds.c,v
retrieving revision 2.54.2.23
diff -u -r2.54.2.23 rpmds.c
--- lib/rpmds.c 9 Dec 2005 19:29:30 -0000 2.54.2.23
+++ lib/rpmds.c 7 Mar 2006 16:16:27 -0000
@@ -2425,6 +2425,7 @@
case SYSCONF:
value = sysconf(c->call_name);
if (value == -1l) {
+#if defined(_SC_UINT_MAX) && defined(_SC_ULONG_MAX)
/*@-unrecog@*/
if (c->call_name == _SC_UINT_MAX
|| c->call_name == _SC_ULONG_MAX) {
@@ -2432,6 +2433,7 @@
sprintf(EVR, "%lu", value);
}
/*@=unrecog@*/
+#endif
} else {
EVR = xmalloc(32);
sprintf(EVR, "%ld", value);
@@ -2441,8 +2443,10 @@
clen = confstr(c->call_name, (char *) NULL, 0);
EVR = xmalloc(clen+1);
*EVR = '\0';
- if (confstr (c->call_name, EVR, clen) != clen)
- error (3, errno, "confstr");
+ if (confstr (c->call_name, EVR, clen) != clen) {
+ fprintf(stderr, "confstr: %s\n", strerror(errno));
+ exit (3);
+ }
EVR[clen] = '\0';
/*@switchbreak@*/ break;
}
@@ -2924,7 +2928,7 @@
#endif
if (un->machine != NULL)
rpmdsNSAdd(dsp, NS, "machine", un->machine, RPMSENSE_EQUAL);
-#if defined(_GNU_SOURCE)
+#if defined(__linux__)
if (un->domainname != NULL && strcmp(un->domainname, "(none)"))
rpmdsNSAdd(dsp, NS, "domainname", un->domainname, RPMSENSE_EQUAL);
#endif

0 comments on commit f02760a

Please sign in to comment.
You can’t perform that action at this time.