Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Sep 2017 19:27:04 +0000 (UTC)
From:      Koop Mast <kwm@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r450629 - head/devel/libgtop/files
Message-ID:  <201709251927.v8PJR4DB013887@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kwm
Date: Mon Sep 25 19:27:04 2017
New Revision: 450629
URL: https://svnweb.freebsd.org/changeset/ports/450629

Log:
  Allow to build on arm64 and riscv by removing the usage of sbrk(2), which
  doesn't exist on arm64 and riscv.
  
  PR:		221751
  Submitted by:	brooks@

Added:
  head/devel/libgtop/files/patch-examples_mountlist.c   (contents, props changed)

Added: head/devel/libgtop/files/patch-examples_mountlist.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/libgtop/files/patch-examples_mountlist.c	Mon Sep 25 19:27:04 2017	(r450629)
@@ -0,0 +1,33 @@
+Remove unreliable and non-portable way to demonstrate memory utilization
+with sbrk(2).
+
+https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=221751
+
+--- examples/mountlist.c.orig
++++ examples/mountlist.c
+@@ -71,16 +71,12 @@
+ 
+ 	printf ("Host = '%s' - %u\n\n", buffer, port);
+ 
+-	printf ("sbrk (0) = %p\n\n", sbrk (0));
+-
+ 	for (c = 0; c < PROFILE_COUNT; c++) {
+ 		mount_entries = glibtop_get_mountlist (&mount_list, 1);
+ 
+ 		g_free (mount_entries);
+ 	}
+ 
+-	printf ("sbrk (0) = %p\n\n", sbrk (0));
+-
+ 	mount_entries = glibtop_get_mountlist (&mount_list, 1);
+ 
+ 	if (mount_entries == NULL)
+@@ -108,8 +104,6 @@
+ 
+ 	g_free (mount_entries);
+ 
+-	printf ("\nsbrk (0) = %p\n\n", sbrk (0));
+-
+ 	glibtop_close ();
+ 
+ 	exit (0);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201709251927.v8PJR4DB013887>