1 # $NetBSD: hacks.mk,v 1.1 2006/05/01 00:19:45 schwarz Exp $
3 .if
!defined
(ORBIT_HACKS_MK
)
4 ORBIT_HACKS_MK
= # defined
6 ### [Sun Apr 30 22:45:25 CDT 2006 : schwarz]
7 ### Make sure ORBit does not define socklen_t if it has already been
8 ### typedef'd in devel/pth's pthread.h.
9 ### This works around the problem reported in pkg/27009.
11 .if exists
(${LOCALBASE}/include/pthread.h
)
12 _SOCKLEN_T_TYPEDEFD
!= ${GREP} -c
'^typedef\ .*\ socklen_t;$$' ${LOCALBASE}/include/pthread.h ||
${TRUE}
13 . if
${_SOCKLEN_T_TYPEDEFD} == "1"
14 PKG_HACKS
+= socklen_t-already-typedefd-in-pthread.h
15 SUBST_CLASSES
+= socklen_t
16 SUBST_FILES.socklen_t
= configure
17 SUBST_STAGE.socklen_t
= post-patch
18 SUBST_SED.socklen_t
= -e
's/^\#define\ socklen_t\ size_t$$//'
19 # remark: \ before # needed to prevent make from interpreting
20 # remainder of line as a comment