summaryrefslogtreecommitdiff
path: root/devel
diff options
context:
space:
mode:
authortnn <tnn@pkgsrc.org>2022-08-17 19:20:30 +0000
committertnn <tnn@pkgsrc.org>2022-08-17 19:20:30 +0000
commit26c9fc5c994f3f701f84984c5fab492c223cc53a (patch)
treedabba19da063615a69e688cb4e260c181ebe6d08 /devel
parent6dbdd62ba48de0c591b3fe1bc73b37b74fb827f3 (diff)
downloadpkgsrc-26c9fc5c994f3f701f84984c5fab492c223cc53a.tar.gz
ocaml-lwt: avoid clash with system headers
Diffstat (limited to 'devel')
-rw-r--r--devel/ocaml-lwt/Makefile.common10
1 files changed, 9 insertions, 1 deletions
diff --git a/devel/ocaml-lwt/Makefile.common b/devel/ocaml-lwt/Makefile.common
index 2a477132533..5634394b520 100644
--- a/devel/ocaml-lwt/Makefile.common
+++ b/devel/ocaml-lwt/Makefile.common
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.common,v 1.10 2022/05/02 14:02:09 jaapb Exp $
+# $NetBSD: Makefile.common,v 1.11 2022/08/17 19:20:30 tnn Exp $
# used by devel/ocaml-lwt_ppx/Makefile
# used by devel/ocaml-lwt_react/Makefile
@@ -16,3 +16,11 @@ OCAML_USE_DUNE= yes
DISTINFO_FILE= ${PKGDIR}/../../devel/ocaml-lwt/distinfo
PATCHDIR= ${PKGDIR}/../../devel/ocaml-lwt/patches
+
+# SunOS <sys/time.h> has #define NANOSEC 1000000000LL, don't clash
+SUBST_CLASSES+= nanosec
+SUBST_MESSAGE.nanosec= renaming NANOSEC macro
+SUBST_STAGE.nanosec= pre-configure
+SUBST_FILES.nanosec= src/unix/lwt_config.h
+SUBST_FILES.nanosec+= src/unix/unix_c/unix_stat_job_utils.c
+SUBST_SED.nanosec+= -e 's,NANOSEC(,LWT_&,g'