Skip to content

Commit

Permalink
security/sks: unbreak against safe-by-default strings in OCaml 4.06+.
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexey Dokuchaev authored and Alexey Dokuchaev committed Sep 5, 2021
1 parent 135d071 commit b717c5d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
2 changes: 2 additions & 0 deletions security/sks/Makefile
Expand Up @@ -33,6 +33,8 @@ post-extract:

post-patch:
@${REINPLACE_CMD} -e '/^CC=/d; /^CFLAGS=/s/=/+=/' ${WRKSRC}/bdb/Makefile
@${REINPLACE_CMD} -E '/^\+OCAML(C|OPT)=/s,$$, -unsafe-string,' \
${WRKSRC}/cryptokit-1.7-sks.patch

pre-build:
@cd ${WRKSRC} && test -f .depend || ${MAKE_CMD} dep
Expand Down
12 changes: 10 additions & 2 deletions security/sks/files/patch-Makefile
@@ -1,6 +1,6 @@
--- Makefile.orig 2019-06-06 15:28:32 UTC
--- Makefile.orig 2021-09-05 17:11:36 UTC
+++ Makefile
@@ -15,9 +15,8 @@
@@ -15,16 +15,15 @@
# USA
#
CINCLUDES=-I`ocamlc -where`
Expand All @@ -11,6 +11,14 @@
CXXFLAGS=-O3 $(CINCLUDES) -I .

ifndef OCAMLC
OCAMLC=ocamlc
endif
ifndef OCAMLOPT
- OCAMLOPT=ocamlopt
+ OCAMLOPT=ocamlopt -unsafe-string
endif
ifndef CAMLP4O
CAMLP4O=camlp4o
@@ -135,16 +134,16 @@ keyMerge.cmx: keyMerge.ml
# Special targets

Expand Down

0 comments on commit b717c5d

Please sign in to comment.