svn commit: r311929 - head/sys/boot/common

Dimitry Andric dim at FreeBSD.org
Wed Jan 11 18:47:01 UTC 2017


Author: dim
Date: Wed Jan 11 18:47:00 2017
New Revision: 311929
URL: https://svnweb.freebsd.org/changeset/base/311929

Log:
  Don't include <errno.h> in reloc_elf.c, as it includes <stand.h> just
  after it, which has a conflicting definition of errno.  This leads to
  the following warning with clang 4.0.0:
  
      In file included from sys/boot/common/reloc_elf32.c:6:
      In file included from sys/boot/common/reloc_elf.c:37:
      /usr/obj/usr/src/tmp/usr/include/stand.h:155:12: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
      extern int errno;
                 ^
      sys/sys/errno.h:46:26: note: expanded from macro 'errno'
      #define errno           (* __error())
                                        ^
  
  MFC after:	3 days

Modified:
  head/sys/boot/common/reloc_elf.c

Modified: head/sys/boot/common/reloc_elf.c
==============================================================================
--- head/sys/boot/common/reloc_elf.c	Wed Jan 11 16:09:25 2017	(r311928)
+++ head/sys/boot/common/reloc_elf.c	Wed Jan 11 18:47:00 2017	(r311929)
@@ -33,7 +33,6 @@ __FBSDID("$FreeBSD$");
 #include <sys/types.h>
 #include <machine/elf.h>
 
-#include <errno.h>
 #include <stand.h>
 
 #define FREEBSD_ELF


More information about the svn-src-all mailing list