aboutsummaryrefslogtreecommitdiffstats
path: root/net/kdenetwork3
diff options
context:
space:
mode:
authormakc <makc@FreeBSD.org>2010-11-03 03:41:36 +0800
committermakc <makc@FreeBSD.org>2010-11-03 03:41:36 +0800
commit3c04d0bb0e9217a4a30578a42cb6736c70ac2527 (patch)
treef2d76b74c9e6534c952aeb38fe67ee5c75eb2ca1 /net/kdenetwork3
parent37345a42ebb7fd41505a3b0081af393d3319b16a (diff)
downloadfreebsd-ports-gnome-3c04d0bb0e9217a4a30578a42cb6736c70ac2527.tar.gz
freebsd-ports-gnome-3c04d0bb0e9217a4a30578a42cb6736c70ac2527.tar.zst
freebsd-ports-gnome-3c04d0bb0e9217a4a30578a42cb6736c70ac2527.zip
Fix build on HEAD
Remove md5 sum while I'm here Submitted by: ed@
Diffstat (limited to 'net/kdenetwork3')
-rw-r--r--net/kdenetwork3/Makefile4
-rw-r--r--net/kdenetwork3/distinfo1
-rw-r--r--net/kdenetwork3/files/extrapatch-find_user.cpp67
3 files changed, 71 insertions, 1 deletions
diff --git a/net/kdenetwork3/Makefile b/net/kdenetwork3/Makefile
index 0c12bc9b1585..98dd7a8cdd12 100644
--- a/net/kdenetwork3/Makefile
+++ b/net/kdenetwork3/Makefile
@@ -50,6 +50,10 @@ KPPP= kppp
PLIST_SUB+= KPPP=""
.endif
+.if ${OSVERSION} >= 900004
+EXTRA_PATCHES+= ${FILESDIR}/extrapatch-find_user.cpp
+.endif
+
pre-configure:
@${REINPLACE_CMD} \
-E -e '/^SUBDIRS/s/lisa//g' \
diff --git a/net/kdenetwork3/distinfo b/net/kdenetwork3/distinfo
index 34d3a1fd796a..fdb4915b2b1b 100644
--- a/net/kdenetwork3/distinfo
+++ b/net/kdenetwork3/distinfo
@@ -1,3 +1,2 @@
-MD5 (KDE/kdenetwork-3.5.10.tar.bz2) = 634b2e914661faebae79d95dcc6c5bfa
SHA256 (KDE/kdenetwork-3.5.10.tar.bz2) = a511aafe2356d6041de1c617085e6d4cf5b3cab38c390dc044c9bd86b3f0d4e9
SIZE (KDE/kdenetwork-3.5.10.tar.bz2) = 9336764
diff --git a/net/kdenetwork3/files/extrapatch-find_user.cpp b/net/kdenetwork3/files/extrapatch-find_user.cpp
new file mode 100644
index 000000000000..c06f544b86ce
--- /dev/null
+++ b/net/kdenetwork3/files/extrapatch-find_user.cpp
@@ -0,0 +1,67 @@
+--- ktalkd/ktalkd/find_user.cpp
++++ ktalkd/ktalkd/find_user.cpp
+@@ -339,34 +339,33 @@
+
+ #else /*not PROC_FIND_USER*/
+
++#include <utmpx.h>
++
+ int find_user(char *name, char *tty, char *disp) {
+
+- struct utmp ubuf;
++ struct utmpx *ubuf;
+ int status;
+- FILE *fd;
+ struct stat statb;
+- char ftty[20+UT_LINESIZE];
+- char ttyFound[UT_LINESIZE] = "";
+- char dispFound[UT_HOSTSIZE+1] = "";
+-
+- if (!(fd = fopen(_PATH_UTMP, "r"))) {
+- fprintf(stderr, "talkd: can't read %s.\n", _PATH_UTMP);
+- return (FAILED);
+- }
++ char ftty[20 + sizeof ubuf->ut_line];
++ char ttyFound[sizeof ubuf->ut_line] = "";
++ char dispFound[sizeof ubuf->ut_line + 1] = "";
++
++ setutxent();
+ #define SCMPN(a, b) strncmp(a, b, sizeof (a))
+ status = NOT_HERE;
+ (void) strcpy(ftty, _PATH_DEV);
+- while (fread((char *) &ubuf, sizeof ubuf, 1, fd) == 1) {
+- if (!SCMPN(ubuf.ut_name, name)) {
++ while ((ubuf = getutxent())) {
++ if ((ubuf->ut_type == USER_PROCESS) &&
++ (!SCMPN(ubuf->ut_user, name))) {
+ if (*tty == '\0') {
+ /* no particular tty was requested */
+- (void) strcpy(ftty+5, ubuf.ut_line);
++ (void) strcpy(ftty+5, ubuf->ut_line);
+ if (stat(ftty,&statb) == 0) {
+ if (!(statb.st_mode & 020)) /* ?character device? */
+ continue;
+- (void) strcpy(ttyFound, ubuf.ut_line);
++ (void) strcpy(ttyFound, ubuf->ut_line);
+ #ifdef USE_UT_HOST
+- (void) strcpy(dispFound, ubuf.ut_host);
++ (void) strcpy(dispFound, ubuf->ut_host);
+ strcat(dispFound, " ");
+ #endif
+ status = SUCCESS;
+@@ -384,13 +383,13 @@
+ }
+ }
+ }
+- else if (!strcmp(ubuf.ut_line, tty)) {
++ else if (!strcmp(ubuf->ut_line, tty)) {
+ status = SUCCESS;
+ break;
+ }
+ }
+ }
+- fclose(fd);
++ endutxent();
+ if (status == SUCCESS) {
+ (void) strcpy(tty, ttyFound);
+ (void) strcpy(disp, dispFound);