Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 1 Sep 2018 12:59:52 +0000 (UTC)
From:      Jan Beich <jbeich@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r478684 - head/devel/edb/files
Message-ID:  <201809011259.w81CxqxB031448@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jbeich
Date: Sat Sep  1 12:59:52 2018
New Revision: 478684
URL: https://svnweb.freebsd.org/changeset/ports/478684

Log:
  devel/edb: unbreak build with Clang 6 (C++14 by default)
  
  os/unix/freebsd/MemoryRegions.cpp:99:9: error: no matching function for call to 'ptrace'
                  while(ptrace(PT_VM_ENTRY, pid_, reinterpret_cast<char*>(&vm_entry), NULL) == 0) {
                        ^~~~~~
  /usr/include/sys/ptrace.h:218:5: note: candidate function not viable: no known conversion from 'nullptr_t' to 'int' for 4th argument
  int     ptrace(int _request, pid_t _pid, caddr_t _addr, int _data);
          ^
  
  Reported by:	pkg-fallout

Added:
  head/devel/edb/files/patch-src_os_unix_freebsd_MemoryRegions.cpp   (contents, props changed)

Added: head/devel/edb/files/patch-src_os_unix_freebsd_MemoryRegions.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/edb/files/patch-src_os_unix_freebsd_MemoryRegions.cpp	Sat Sep  1 12:59:52 2018	(r478684)
@@ -0,0 +1,21 @@
+FreeBSD and OpenBSD promote NULL to nullptr for C++11 or later.
+https://svnweb.freebsd.org/changeset/base/228918
+
+os/unix/freebsd/MemoryRegions.cpp:99:9: error: no matching function for call to 'ptrace'
+                while(ptrace(PT_VM_ENTRY, pid_, reinterpret_cast<char*>(&vm_entry), NULL) == 0) {
+                      ^~~~~~
+/usr/include/sys/ptrace.h:218:5: note: candidate function not viable: no known conversion from 'nullptr_t' to 'int' for 4th argument
+int     ptrace(int _request, pid_t _pid, caddr_t _addr, int _data);
+        ^
+
+--- src/os/unix/freebsd/MemoryRegions.cpp.orig	2011-07-19 20:29:01 UTC
++++ src/os/unix/freebsd/MemoryRegions.cpp
+@@ -96,7 +96,7 @@ void MemoryRegions::sync() {
+ 		memset(&vm_entry, 0, sizeof(vm_entry));
+ 		vm_entry.pve_entry = 0;
+ 
+-		while(ptrace(PT_VM_ENTRY, pid_, reinterpret_cast<char*>(&vm_entry), NULL) == 0) {
++		while(ptrace(PT_VM_ENTRY, pid_, reinterpret_cast<char*>(&vm_entry), 0) == 0) {
+ 			vm_entry.pve_path    = buffer;
+ 			vm_entry.pve_pathlen = sizeof(buffer);
+ 



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