Skip to content

Commit

Permalink
Include nbtool_config.h as needed. Should fix missing defn of __unuse…
Browse files Browse the repository at this point in the history
…d in

some host tool environments.
  • Loading branch information
thorpej committed Dec 29, 2009
1 parent 4cf3f3b commit 82e70ed
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
3 changes: 2 additions & 1 deletion external/bsd/libelf/dist/libelf.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $NetBSD: libelf.h,v 1.5 2009/12/21 18:21:17 thorpej Exp $ */
/* $NetBSD: libelf.h,v 1.6 2009/12/29 17:32:18 thorpej Exp $ */

/*-
* Copyright (c) 2006 Joseph Koshy
Expand Down Expand Up @@ -36,6 +36,7 @@
#include <inttypes.h>

#if HAVE_NBTOOL_CONFIG_H
# include "nbtool_config.h"
# include <nbinclude/sys/exec_elf.h>
# define __LIBELF_HAVE_ELF_CAP 1
# define __LIBELF_HAVE_ELF_MOVE 1
Expand Down
8 changes: 7 additions & 1 deletion tools/libelf/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# $NetBSD: Makefile,v 1.2 2009/12/23 20:28:29 cegger Exp $
# $NetBSD: Makefile,v 1.3 2009/12/29 17:32:18 thorpej Exp $

.include <bsd.own.mk>

HOSTLIB= elf

Expand Down Expand Up @@ -64,6 +66,10 @@ CPPFLAGS+= -no-cpp-precomp
# other file ops, on many systems, without changing function names.

CPPFLAGS+= -DHAVE_NBTOOL_CONFIG_H=1 -D_FILE_OFFSET_BITS=64
.ifndef NOCOMPATLIB
COMPATOBJ!= cd ${.CURDIR}/../compat && ${PRINTOBJDIR}
CPPFLAGS+= -I${COMPATOBJ}
.endif

.PATH: ${LIBELF_DIR}

Expand Down

0 comments on commit 82e70ed

Please sign in to comment.