-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Nathan Owens <ndowens04@gmail.com>
- Loading branch information
Showing
15 changed files
with
168 additions
and
157 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
From a4068f03b471777151c4eb43fc70c3b6ebf8df3a Mon Sep 17 00:00:00 2001 | ||
From: Nathan Owens <ndowens04@gmail.com> | ||
Date: Wed, 18 Dec 2019 18:23:38 -0600 | ||
Subject: [PATCH 1/4] musl-sterror_r | ||
|
||
Signed-off-by: Nathan Owens <ndowens04@gmail.com> | ||
--- | ||
snapper/AppUtil.cc | 2 +- | ||
1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
||
diff --git a/snapper/AppUtil.cc b/snapper/AppUtil.cc | ||
index 553065c..2897276 100644 | ||
--- snapper/AppUtil.cc | ||
+++ snapper/AppUtil.cc | ||
@@ -223,7 +223,7 @@ namespace snapper | ||
string | ||
stringerror(int errnum) | ||
{ | ||
-#if (_POSIX_C_SOURCE >= 200112L) && ! _GNU_SOURCE | ||
+#if (_POSIX_C_SOURCE >= 200112L) && ! _GNU_SOURCE || MUSL_LIBC | ||
char buf1[100]; | ||
if (strerror_r(errnum, buf1, sizeof(buf1) - 1) == 0) | ||
return string(buf1); | ||
-- | ||
2.24.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
From 6385e34fb13dbfabd0b4b93f7670eac0c490637f Mon Sep 17 00:00:00 2001 | ||
From: Nathan Owens <ndowens04@gmail.com> | ||
Date: Wed, 18 Dec 2019 18:24:08 -0600 | ||
Subject: [PATCH 2/4] musl-mktime | ||
|
||
Signed-off-by: Nathan Owens <ndowens04@gmail.com> | ||
--- | ||
snapper/AppUtil.cc | 2 +- | ||
1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
||
diff --git a/snapper/AppUtil.cc b/snapper/AppUtil.cc | ||
index 2897276..64812d7 100644 | ||
--- snapper/AppUtil.cc | ||
+++ snapper/AppUtil.cc | ||
@@ -288,7 +288,7 @@ namespace snapper | ||
const char* p = strptime(str.c_str(), "%F %T", &s); | ||
if (!p || *p != '\0') | ||
return (time_t)(-1); | ||
- return utc ? timegm(&s) : timelocal(&s); | ||
+ return utc ? timegm(&s) : mktime(&s); | ||
} | ||
|
||
|
||
-- | ||
2.24.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
From 554bf69b4cfb5e91a20f0df0ac0fef918648fb48 Mon Sep 17 00:00:00 2001 | ||
From: Nathan Owens <ndowens04@gmail.com> | ||
Date: Wed, 18 Dec 2019 18:26:02 -0600 | ||
Subject: [PATCH 3/4] musl-_nl_msg_cat_cntr | ||
|
||
Signed-off-by: Nathan Owens <ndowens04@gmail.com> | ||
--- | ||
snapper/Regex.cc | 17 ++++++++++++----- | ||
1 file changed, 12 insertions(+), 5 deletions(-) | ||
|
||
diff --git a/snapper/Regex.cc b/snapper/Regex.cc | ||
index da8f862..6b2cd2d 100644 | ||
--- snapper/Regex.cc | ||
+++ snapper/Regex.cc | ||
@@ -21,9 +21,9 @@ | ||
|
||
#include <stdexcept> | ||
#include "snapper/Regex.h" | ||
- | ||
+#ifdef __GLIBC__ | ||
extern int _nl_msg_cat_cntr; | ||
- | ||
+#endif | ||
|
||
namespace snapper | ||
{ | ||
@@ -40,8 +40,10 @@ Regex::Regex (const string& pattern, int cflags, unsigned int nm) | ||
regerror(errcode, &rx, error, esize); | ||
throw std::runtime_error(string("Regex compilation error: ") + error); | ||
} | ||
+#ifdef __GLIBC__ | ||
my_nl_msg_cat_cntr = _nl_msg_cat_cntr; | ||
- rm = new regmatch_t[nm]; | ||
+#endif | ||
+ rm = new regmatch_t[nm]; | ||
} | ||
|
||
|
||
@@ -55,11 +57,16 @@ Regex::~Regex () | ||
bool | ||
Regex::match (const string& str, int eflags) const | ||
{ | ||
- if (my_nl_msg_cat_cntr != _nl_msg_cat_cntr) { | ||
+#ifdef __GLIBC__ | ||
+ if (my_nl_msg_cat_cntr != _nl_msg_cat_cntr) | ||
+#endif | ||
+ { | ||
regfree (&rx); | ||
regcomp (&rx, pattern.c_str (), cflags); | ||
+#ifdef __GLIBC__ | ||
my_nl_msg_cat_cntr = _nl_msg_cat_cntr; | ||
- } | ||
+#endif | ||
+ } | ||
|
||
last_str = str; | ||
|
||
-- | ||
2.24.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
From d519c3c94a029d6891b0703ce5adb6ea0ac8b9fa Mon Sep 17 00:00:00 2001 | ||
From: Nathan Owens <ndowens04@gmail.com> | ||
Date: Wed, 18 Dec 2019 18:27:17 -0600 | ||
Subject: [PATCH 4/4] musl-stdout_stderr | ||
|
||
Signed-off-by: Nathan Owens <ndowens04@gmail.com> | ||
--- | ||
snapper/SystemCmd.h | 2 ++ | ||
1 file changed, 2 insertions(+) | ||
|
||
diff --git a/snapper/SystemCmd.h b/snapper/SystemCmd.h | ||
index 3d38604..72bbb2b 100644 | ||
--- snapper/SystemCmd.h | ||
+++ snapper/SystemCmd.h | ||
@@ -32,6 +32,8 @@ | ||
#include <list> | ||
#include <boost/noncopyable.hpp> | ||
|
||
+#undef stdout | ||
+#undef stderr | ||
|
||
namespace snapper | ||
{ | ||
-- | ||
2.24.1 | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
From 7ddd58ee5e6b7c3a8df3086ff5a6d17d19362761 Mon Sep 17 00:00:00 2001 | ||
From: Nathan Owens <ndowens04@gmail.com> | ||
Date: Wed, 18 Dec 2019 18:35:55 -0600 | ||
Subject: [PATCH] musl-_u_int-types | ||
|
||
Signed-off-by: Nathan Owens <ndowens04@gmail.com> | ||
--- | ||
client/utils/JsonFormatter.h | 3 +++ | ||
1 file changed, 3 insertions(+) | ||
|
||
diff --git client/utils/JsonFormatter.h client/utils/JsonFormatter.h | ||
index 79f7672..501b77d 100644 | ||
--- client/utils/JsonFormatter.h | ||
+++ client/utils/JsonFormatter.h | ||
@@ -25,6 +25,9 @@ | ||
#include <string> | ||
#include <vector> | ||
#include <utility> | ||
+#ifndef __GLIBC__ | ||
+#include <sys/types.h> | ||
+#endif | ||
|
||
namespace snapper | ||
{ | ||
-- | ||
2.24.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters