Skip to content

Instantly share code, notes, and snippets.

@Kakadu
Created August 15, 2026 16:44
Show Gist options
  • Select an option

  • Save Kakadu/e8309bcbffc50c66a96ad742aaa92b80 to your computer and use it in GitHub Desktop.

Select an option

Save Kakadu/e8309bcbffc50c66a96ad742aaa92b80 to your computer and use it in GitHub Desktop.
diff --git a/src/qrencode_stubs.c b/src/qrencode_stubs.c
index 2e3389e..1956395 100644
--- a/src/qrencode_stubs.c
+++ b/src/qrencode_stubs.c
@@ -28,7 +28,7 @@ static struct custom_operations qrcode_ops = {
/* Allocating a Caml custom block to hold the given QRcode * */
static value alloc_QRcode(QRcode * w) {
- value v = alloc_custom(&qrcode_ops, sizeof(QRcode *), 0, 1);
+ value v = caml_alloc_custom(&qrcode_ops, sizeof(QRcode *), 0, 1);
QRcode_val(v) = w;
return v;
}
@@ -59,7 +59,7 @@ static struct custom_operations qrinput_ops = {
/* Allocating a Caml custom block to hold the given QRinput * */
static value alloc_QRinput(QRinput * w) {
- value v = alloc_custom(&qrinput_ops, sizeof(QRinput *), 0, 1);
+ value v = caml_alloc_custom(&qrinput_ops, sizeof(QRinput *), 0, 1);
QRinput_val(v) = w;
return v;
}
diff --git a/src/config/discover.ml b/src/config/discover.ml
index f849950..d335e03 100644
--- a/src/config/discover.ml
+++ b/src/config/discover.ml
@@ -3,7 +3,7 @@ module C = Configurator.V1
let () =
C.main ~name:"libqrencode" begin fun c ->
let default : C.Pkg_config.package_conf = {
- libs = ["-lqrencode -libpng16 -lz"];
+ libs = ["-L/usr/lib/x86_64-linux-gnu -lqrencode -libpng16 -lz"];
cflags = []
} in
let conf =
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment