mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-04-12 16:06:42 +02:00
116 lines
2.4 KiB
Diff
116 lines
2.4 KiB
Diff
diff --git a/bwrap-oci.c b/bwrap-oci.c
|
|
index a37fea1..1686b0d 100644
|
|
--- a/bwrap-oci.c
|
|
+++ b/bwrap-oci.c
|
|
@@ -19,7 +19,9 @@
|
|
#include <config.h>
|
|
#include <unistd.h>
|
|
#include <stdlib.h>
|
|
+#ifdef HAVE_ERROR_H
|
|
#include <error.h>
|
|
+#endif
|
|
#include <stdio.h>
|
|
#include <glib.h>
|
|
#include <glib-object.h>
|
|
diff --git a/configure.ac b/configure.ac
|
|
index db26633..9b37286 100644
|
|
--- a/configure.ac
|
|
+++ b/configure.ac
|
|
@@ -18,10 +18,32 @@ PKG_CHECK_MODULES(JSON_GLIB, [json-glib-1.0])
|
|
PKG_CHECK_MODULES(GIO_UNIX, [gio-unix-2.0])
|
|
AC_CHECK_LIB(seccomp, seccomp_rule_add)
|
|
|
|
+AC_CHECK_HEADERS([error.h])
|
|
+
|
|
AC_PATH_PROG(BWRAP, [bwrap])
|
|
AC_DEFINE_UNQUOTED([BWRAP], ["$BWRAP"], [Path to bwrap])
|
|
|
|
AC_CONFIG_FILES([
|
|
Makefile
|
|
])
|
|
+
|
|
+AH_BOTTOM([
|
|
+#ifndef HAVE_ERROR_H
|
|
+#ifndef _ERROR_LOCAL
|
|
+#define _ERROR_LOCAL 1
|
|
+#include <string.h>
|
|
+#include <stdio.h>
|
|
+#include <stdlib.h>
|
|
+
|
|
+static void error(int status, int errnum, const char *msg, ...) {
|
|
+ if (errnum)
|
|
+ fprintf(stderr, ": %s\n", strerror(errnum));
|
|
+ else
|
|
+ fputc('\n', stderr);
|
|
+ if (status)
|
|
+ exit(status);
|
|
+}
|
|
+#endif
|
|
+#endif
|
|
+])
|
|
AC_OUTPUT
|
|
diff --git a/kill.c b/kill.c
|
|
index c180098..03527ce 100644
|
|
--- a/kill.c
|
|
+++ b/kill.c
|
|
@@ -19,7 +19,9 @@
|
|
#include <config.h>
|
|
#include "util.h"
|
|
#include "kill.h"
|
|
+#ifdef HAVE_ERROR_H
|
|
#include <error.h>
|
|
+#endif
|
|
#include <stdlib.h>
|
|
#include <errno.h>
|
|
|
|
diff --git a/list.c b/list.c
|
|
index f0260ec..6b216a1 100644
|
|
--- a/list.c
|
|
+++ b/list.c
|
|
@@ -19,7 +19,9 @@
|
|
#include <config.h>
|
|
#include <unistd.h>
|
|
#include <stdlib.h>
|
|
+#ifdef HAVE_ERROR_H
|
|
#include <error.h>
|
|
+#endif
|
|
#include <stdio.h>
|
|
#include <glib.h>
|
|
#include <glib-object.h>
|
|
diff --git a/run.c b/run.c
|
|
index 1407299..d81bb51 100644
|
|
--- a/run.c
|
|
+++ b/run.c
|
|
@@ -19,7 +19,9 @@
|
|
#include <config.h>
|
|
#include <unistd.h>
|
|
#include <stdlib.h>
|
|
+#ifdef HAVE_ERROR_H
|
|
#include <error.h>
|
|
+#endif
|
|
#include <stdio.h>
|
|
#include <glib.h>
|
|
#include <glib-object.h>
|
|
diff --git a/util.c b/util.c
|
|
index 8f3a1d4..b56d5ec 100644
|
|
--- a/util.c
|
|
+++ b/util.c
|
|
@@ -20,7 +20,9 @@
|
|
#include "util.h"
|
|
#include <unistd.h>
|
|
#include <stdlib.h>
|
|
+#ifdef HAVE_ERROR_H
|
|
#include <error.h>
|
|
+#endif
|
|
#include <stdio.h>
|
|
#include <glib.h>
|
|
#include <glib-object.h>
|
|
@@ -359,7 +361,7 @@ get_bundle_path (const char *rootfs)
|
|
{
|
|
gchar *ret;
|
|
cleanup_free gchar *tmp = g_strdup (rootfs);
|
|
- ret = canonicalize_file_name(dirname (tmp));
|
|
+ ret = realpath(dirname (tmp), NULL);
|
|
return ret;
|
|
}
|
|
|