aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-util/systemtap/files/systemtap-2.9-musl.patch')
-rw-r--r--dev-util/systemtap/files/systemtap-2.9-musl.patch182
1 files changed, 0 insertions, 182 deletions
diff --git a/dev-util/systemtap/files/systemtap-2.9-musl.patch b/dev-util/systemtap/files/systemtap-2.9-musl.patch
deleted file mode 100644
index c90804f..0000000
--- a/dev-util/systemtap/files/systemtap-2.9-musl.patch
+++ /dev/null
@@ -1,182 +0,0 @@
-diff -Naur systemtap-2.9.orig/buildrun.cxx systemtap-2.9/buildrun.cxx
---- systemtap-2.9.orig/buildrun.cxx 2017-02-24 10:47:12.478787249 -0800
-+++ systemtap-2.9/buildrun.cxx 2017-02-24 10:47:56.414162998 -0800
-@@ -788,13 +788,14 @@
- if (s.need_uprobes && !kernel_built_uprobes(s))
- {
- string opt_u = "-u";
-+ char *p = strchr(s.uprobes_path.c_str(), '/');
- if (!s.uprobes_path.empty() &&
- strverscmp("1.4", version.c_str()) <= 0)
- {
- if (remotedir.empty())
- opt_u.append(s.uprobes_path);
- else
-- opt_u.append(remotedir + "/" + basename(s.uprobes_path.c_str()));
-+ opt_u.append(remotedir + "/" + (p ? p + 1 : s.uprobes_path.c_str()));
- }
- staprun_cmd.push_back(opt_u);
- }
-diff -Naur systemtap-2.9.orig/configure.ac systemtap-2.9/configure.ac
---- systemtap-2.9.orig/configure.ac 2017-02-24 10:47:12.480787266 -0800
-+++ systemtap-2.9/configure.ac 2017-02-24 10:48:24.679405813 -0800
-@@ -443,6 +443,50 @@
- fi
- fi
-
-+dnl Check if we have argp available from our libc
-+AC_LINK_IFELSE(
-+ [AC_LANG_PROGRAM(
-+ [#include <argp.h>],
-+ [int argc=1; char *argv[]={"test"}, argp_parse(0,argc,argv,0,0,0); return 0;]
-+ )],
-+ [libc_has_argp="true"],
-+ [libc_has_argp="false"]
-+)
-+
-+dnl If our libc doesn't provide argp, then test for libargp
-+if test "$libc_has_argp" = "false" ; then
-+ AC_MSG_WARN("libc does not have argp")
-+ AC_CHECK_LIB([argp], [argp_parse], [have_obstack="true"], [have_obstack="false"])
-+
-+ if test "$have_argp" = "false"; then
-+ AC_MSG_ERROR("no libargp found")
-+ else
-+ stap_LIBS="$stap_LIBS -largp"
-+ fi
-+fi
-+
-+dnl Check if we have obstack available from our libc
-+AC_LINK_IFELSE(
-+ [AC_LANG_PROGRAM(
-+ [#include <obstack.h>],
-+ [_obstack_begin(0, 0, 0, 0, 0); return 0;]
-+ )],
-+ [libc_has_obstack="true", AC_DEFINE(HAVE_OBSTACK, 1)],
-+ [libc_has_obstack="false"]
-+)
-+
-+dnl If our libc doesn't provide obstack, then test for libobstack
-+if test "$libc_has_obstack" = "false" ; then
-+ AC_MSG_WARN("libc does not have obstack")
-+ AC_CHECK_LIB([obstack], [_obstack_begin], [have_obstack="true"], [have_obstack="false"])
-+
-+ if test "$have_obstack" = "false"; then
-+ AC_MSG_ERROR("no libobstack found")
-+ else
-+ stap_LIBS="$stap_LIBS -lobstack"
-+ fi
-+fi
-+
- AC_SUBST(stap_LIBS)
- AC_MSG_NOTICE([stap will link $stap_LIBS])
-
-diff -Naur systemtap-2.9.orig/csclient.cxx systemtap-2.9/csclient.cxx
---- systemtap-2.9.orig/csclient.cxx 2017-02-24 10:47:12.481787274 -0800
-+++ systemtap-2.9/csclient.cxx 2017-02-24 10:48:59.261702894 -0800
-@@ -75,6 +75,10 @@
-
- #define MOK_PUBLIC_CERT_NAME "signing_key.x509"
-
-+#ifndef NI_IDN
-+#define NI_IDN 32
-+#endif
-+
- static PRIPv6Addr &copyAddress (PRIPv6Addr &PRin6, const in6_addr &in6);
- static PRNetAddr &copyNetAddr (PRNetAddr &x, const PRNetAddr &y);
- bool operator!= (const PRNetAddr &x, const PRNetAddr &y);
-@@ -1038,7 +1042,7 @@
-
- // Canonicalize the given path and remove the leading /.
- string rpath;
-- char *cpath = canonicalize_file_name (path.c_str ());
-+ char *cpath = realpath (path.c_str (), NULL);
- if (! cpath)
- {
- // It can not be canonicalized. Use the name relative to
-diff -Naur systemtap-2.9.orig/error.h systemtap-2.9/error.h
---- systemtap-2.9.orig/error.h 1969-12-31 16:00:00.000000000 -0800
-+++ systemtap-2.9/error.h 2017-02-24 10:49:03.823742085 -0800
-@@ -0,0 +1,27 @@
-+#ifndef _ERROR_H_
-+#define _ERROR_H_
-+
-+#include <stdarg.h>
-+#include <stdio.h>
-+#include <stdlib.h>
-+#include <string.h>
-+#include <errno.h>
-+
-+static unsigned int error_message_count = 0;
-+
-+static inline void error(int status, int errnum, const char* format, ...)
-+{
-+ va_list ap;
-+ fprintf(stderr, "%s: ", program_invocation_name);
-+ va_start(ap, format);
-+ vfprintf(stderr, format, ap);
-+ va_end(ap);
-+ if (errnum)
-+ fprintf(stderr, ": %s", strerror(errnum));
-+ fprintf(stderr, "\n");
-+ error_message_count++;
-+ if (status)
-+ exit(status);
-+}
-+
-+#endif /* _ERROR_H_ */
-diff -Naur systemtap-2.9.orig/remote.cxx systemtap-2.9/remote.cxx
---- systemtap-2.9.orig/remote.cxx 2017-02-24 10:47:12.532787709 -0800
-+++ systemtap-2.9/remote.cxx 2017-02-24 10:49:25.245926113 -0800
-@@ -459,7 +459,8 @@
-
- if (!s->uprobes_path.empty())
- {
-- string remoteuprobes = basename(s->uprobes_path.c_str());
-+ char *p = strchr(s->uprobes_path.c_str(), '/');
-+ string remoteuprobes = p ? p + 1 : s->uprobes_path.c_str();
- if ((rc = send_file(s->uprobes_path, remoteuprobes)))
- return rc;
-
-diff -Naur systemtap-2.9.orig/sdt_types.h systemtap-2.9/sdt_types.h
---- systemtap-2.9.orig/sdt_types.h 2017-02-24 10:47:12.572788050 -0800
-+++ systemtap-2.9/sdt_types.h 2017-02-24 10:49:42.865077472 -0800
-@@ -10,6 +10,13 @@
- #define UPROBE2_TYPE 0x32425055 /* "UPB2" */
- #define UPROBE3_TYPE 0x33425055 /* "UPB3" */
-
-+#ifndef __uint32_t
-+#define __uint32_t uint32_t
-+#endif
-+#ifndef __uint64_t
-+#define __uint64_t uint64_t
-+#endif
-+
- typedef enum
- {
- uprobe1_type = UPROBE1_TYPE,
-diff -Naur systemtap-2.9.orig/session.cxx systemtap-2.9/session.cxx
---- systemtap-2.9.orig/session.cxx 2017-02-24 10:47:12.572788050 -0800
-+++ systemtap-2.9/session.cxx 2017-02-24 10:49:56.716196203 -0800
-@@ -1329,7 +1329,7 @@
- cerr << "ERROR: multiple --sysroot options not supported" << endl;
- return 1;
- } else {
-- char *spath = canonicalize_file_name (optarg);
-+ char *spath = realpath (optarg, NULL);
- if (spath == NULL) {
- cerr << _F("ERROR: %s is an invalid directory for --sysroot", optarg) << endl;
- return 1;
-diff -Naur systemtap-2.9.orig/staprun/staprun.h systemtap-2.9/staprun/staprun.h
---- systemtap-2.9.orig/staprun/staprun.h 2017-02-24 10:47:12.581788127 -0800
-+++ systemtap-2.9/staprun/staprun.h 2017-02-24 10:50:18.951386526 -0800
-@@ -47,6 +47,9 @@
- #include <locale.h>
- #endif
-
-+#ifndef __off_t
-+#define __off_t off_t
-+#endif
-
- /* define gettext options if NLS is set */
- #if ENABLE_NLS