This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH PR79562] fix bootstrap on FreeBSD


On 16.02.17 22:03, Jakub Jelinek wrote:
On Thu, Feb 16, 2017 at 09:57:48PM +0100, Andreas Tobler wrote:
is this patch ok for trunk?

Fixes bootstrap for x86_64-*-freebsd12 where the internal struct rtentry has
gone from userland.

TIA,
Andreas

2017-02-16  Andreas Tobler  <andreast@gcc.gnu.org>

	PR sanitizer/79562
	* sanitizer_common/sanitizer_platform_limits_posix.cc: Cherry-pick
	upstream r294806.

Ok, thanks.

I'm just surprised by the
"The problem was introduced within the last 8 days."
comment in the PR, because this file has been modified last time on
2016-11-08.

Yeah, I understand. This is due to the fact that on FreeBSD trunk (aka. *-*-freebsd12) this commit (https://svnweb.freebsd.org/base?view=revision&revision=313560) dropped the _WANT_RTENTRY from net/route.h.
Iow, all version of FreeBSD < svn commit r313560 will build w/o patch.

Thanks,
Andreas


Index: libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc
===================================================================
--- libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc	(revision 245506)
+++ libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc	(working copy)
@@ -21,11 +21,6 @@
 #ifdef _FILE_OFFSET_BITS
 #undef _FILE_OFFSET_BITS
 #endif
-#if SANITIZER_FREEBSD
-#define _WANT_RTENTRY
-#include <sys/param.h>
-#include <sys/socketvar.h>
-#endif
 #include <arpa/inet.h>
 #include <dirent.h>
 #include <errno.h>
@@ -420,6 +415,7 @@
   unsigned struct_input_absinfo_sz = sizeof(struct input_absinfo);
   unsigned struct_input_id_sz = sizeof(struct input_id);
   unsigned struct_mtpos_sz = sizeof(struct mtpos);
+  unsigned struct_rtentry_sz = sizeof(struct rtentry);
   unsigned struct_termio_sz = sizeof(struct termio);
   unsigned struct_vt_consize_sz = sizeof(struct vt_consize);
   unsigned struct_vt_sizes_sz = sizeof(struct vt_sizes);
@@ -439,7 +435,6 @@
   unsigned struct_midi_info_sz = sizeof(struct midi_info);
   unsigned struct_mtget_sz = sizeof(struct mtget);
   unsigned struct_mtop_sz = sizeof(struct mtop);
-  unsigned struct_rtentry_sz = sizeof(struct rtentry);
   unsigned struct_sbi_instrument_sz = sizeof(struct sbi_instrument);
   unsigned struct_seq_event_rec_sz = sizeof(struct seq_event_rec);
   unsigned struct_synth_info_sz = sizeof(struct synth_info);


	Jakub



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]