Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 3 Jul 2018 23:45:02 +0000 (UTC)
From:      Matt Macy <mmacy@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r335920 - head/sys/cddl/compat/opensolaris/sys
Message-ID:  <201807032345.w63Nj2x3083975@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mmacy
Date: Tue Jul  3 23:45:02 2018
New Revision: 335920
URL: https://svnweb.freebsd.org/changeset/base/335920

Log:
  opensolaris compat: fix compile error
  
  when opensolaris/sys/types.h is included before stddef.h ptrdiff_t
  would be typedef'd twice

Modified:
  head/sys/cddl/compat/opensolaris/sys/types.h

Modified: head/sys/cddl/compat/opensolaris/sys/types.h
==============================================================================
--- head/sys/cddl/compat/opensolaris/sys/types.h	Tue Jul  3 23:30:53 2018	(r335919)
+++ head/sys/cddl/compat/opensolaris/sys/types.h	Tue Jul  3 23:45:02 2018	(r335920)
@@ -72,7 +72,10 @@ typedef	u_int		minor_t;
 
 typedef	short		index_t;
 typedef	off_t		offset_t;
-typedef	long		ptrdiff_t;	/* pointer difference */
+#ifndef _PTRDIFF_T_DECLARED
+typedef	__ptrdiff_t		ptrdiff_t;	/* pointer difference */
+#define _PTRDIFF_T_DECLARED
+#endif
 typedef	int64_t		rlim64_t;
 typedef	int		major_t;
 



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