From 755f66e22364fefd20a9749d9424a8ad1b09e10c Mon Sep 17 00:00:00 2001 From: Chris Rees Date: Mon, 31 Jul 2017 22:03:45 +0000 Subject: [PATCH] Simple fix for Tooltalk coredump PR: ports/221102 Submitted by: mikael.urankar@gmail.com --- x11-wm/cde/Makefile | 1 + .../patch-lib_tt_lib_util_tt__file__system.C | 23 +++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 x11-wm/cde/files/patch-lib_tt_lib_util_tt__file__system.C diff --git a/x11-wm/cde/Makefile b/x11-wm/cde/Makefile index d1a81534f904..94a7527fbfe2 100644 --- a/x11-wm/cde/Makefile +++ b/x11-wm/cde/Makefile @@ -2,6 +2,7 @@ PORTNAME= cde DISTVERSION= 2.2.3 +PORTREVISION= 1 CATEGORIES= x11-wm MASTER_SITES= SF/cdesktopenv/src/ DISTNAME= ${PORTNAME}-src-${DISTVERSION} diff --git a/x11-wm/cde/files/patch-lib_tt_lib_util_tt__file__system.C b/x11-wm/cde/files/patch-lib_tt_lib_util_tt__file__system.C new file mode 100644 index 000000000000..f68dc27e0d10 --- /dev/null +++ b/x11-wm/cde/files/patch-lib_tt_lib_util_tt__file__system.C @@ -0,0 +1,23 @@ +--- lib/tt/lib/util/tt_file_system.C 2016-06-19 20:46:29 UTC ++++ lib/tt/lib/util/tt_file_system.C +@@ -46,6 +46,7 @@ + + #include + #include ++#include + #if defined(linux) + # include + #else +@@ -516,7 +517,11 @@ updateFileSystemEntries () + int flags = MNT_NOWAIT; + char *s, *host, path[MNAMELEN] ; + +- numfs = getfsstat ( (struct statfs *)0, 0, 0 ); ++ numfs = getfsstat ( (struct statfs *)0, 0, flags ); ++ if(numfs == (-1)){ ++ _tt_syslog(0,LOG_ERR,"getfsstat: %s",strerror(errno)); ++ exit(EXIT_FAILURE); ++ } + + bufsize = numfs * sizeof ( struct statfs ); + buf = (struct statfs *) malloc ( bufsize );