Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/community/libfaketime
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2019-10-28 19:11:10 +0100
committerErich Eckner <git@eckner.net>2019-10-28 19:11:10 +0100
commit459277311f839d7c4bcb5a87c71827fb2ec12c16 (patch)
tree5d8c14d32794cf71325b233d2009dea3f60667d8 /community/libfaketime
parent65a1a3c0214aaf4d35c5d2f5e2cd6f2853530fa2 (diff)
community/libfaketime: remove hotfix
Diffstat (limited to 'community/libfaketime')
-rw-r--r--community/libfaketime/PKGBUILD7
-rw-r--r--community/libfaketime/libfaketime.patch80
2 files changed, 0 insertions, 87 deletions
diff --git a/community/libfaketime/PKGBUILD b/community/libfaketime/PKGBUILD
deleted file mode 100644
index 6073b8fb..00000000
--- a/community/libfaketime/PKGBUILD
+++ /dev/null
@@ -1,7 +0,0 @@
-# hotfix for FS#60456
-source+=('libfaketime.patch')
-md5sums+=('cdec9bde3e4093310225cf458059a321')
-prepare() {
- cd "${pkgname}-${pkgver}"
- patch -p1 -i ../libfaketime.patch
-}
diff --git a/community/libfaketime/libfaketime.patch b/community/libfaketime/libfaketime.patch
deleted file mode 100644
index 085036c4..00000000
--- a/community/libfaketime/libfaketime.patch
+++ /dev/null
@@ -1,80 +0,0 @@
-diff --git a/src/faketime.c b/src/faketime.c
-index 138ebbd..037d749 100644
---- a/src/faketime.c
-+++ b/src/faketime.c
-@@ -209,7 +209,7 @@ int main (int argc, char **argv)
- int shm_fd;
- sem_t *sem;
- struct ft_shared_s *ft_shared;
-- char shared_objs[PATH_BUFSIZE];
-+ char shared_objs[PATH_BUFSIZE * 2 + 1];
-
- /*
- * Casting of getpid() return value to long needed to make GCC on SmartOS
-@@ -286,7 +286,7 @@ int main (int argc, char **argv)
- exit(EXIT_FAILURE);
- }
-
-- snprintf(shared_objs, PATH_BUFSIZE, "%s %s", sem_name, shm_name);
-+ snprintf(shared_objs, sizeof(shared_objs), "%s %s", sem_name, shm_name);
- setenv("FAKETIME_SHARED", shared_objs, true);
- sem_close(sem);
- }
-diff --git a/src/libfaketime.c b/src/libfaketime.c
-index eb2d01b..0002619 100644
---- a/src/libfaketime.c
-+++ b/src/libfaketime.c
-@@ -1828,7 +1828,8 @@ void ftpl_init(void)
- if ((tmp_env = getenv("FAKETIME_SPAWN_TARGET")) != NULL)
- {
- spawnsupport = true;
-- (void) strncpy(ft_spawn_target, getenv("FAKETIME_SPAWN_TARGET"), 1024);
-+ (void) strncpy(ft_spawn_target, getenv("FAKETIME_SPAWN_TARGET"), sizeof(ft_spawn_target) - 1);
-+ ft_spawn_target[sizeof(ft_spawn_target) - 1] = 0;
- if ((tmp_env = getenv("FAKETIME_SPAWN_SECONDS")) != NULL)
- {
- ft_spawn_secs = atol(tmp_env);
-@@ -1889,7 +1890,8 @@ void ftpl_init(void)
- }
- else
- {
-- strncpy(user_faked_time_fmt, tmp_env, BUFSIZ);
-+ strncpy(user_faked_time_fmt, tmp_env, BUFSIZ - 1);
-+ user_faked_time_fmt[BUFSIZ - 1] = 0;
- }
-
- if (shared_sem != 0)
-@@ -1960,6 +1962,14 @@ static void remove_trailing_eols(char *line)
- * =======================================================================
- */
-
-+#ifdef PTHREAD_SINGLETHREADED_TIME
-+static void pthread_cleanup_mutex_lock(void *data)
-+{
-+ pthread_mutex_t *mutex = data;
-+ pthread_mutex_unlock(mutex);
-+}
-+#endif
-+
- int fake_clock_gettime(clockid_t clk_id, struct timespec *tp)
- {
- /* variables used for caching, introduced in version 0.6 */
-@@ -1983,7 +1993,7 @@ int fake_clock_gettime(clockid_t clk_id, struct timespec *tp)
- #ifdef PTHREAD_SINGLETHREADED_TIME
- static pthread_mutex_t time_mutex=PTHREAD_MUTEX_INITIALIZER;
- pthread_mutex_lock(&time_mutex);
-- pthread_cleanup_push((void (*)(void *))pthread_mutex_unlock, (void *)&time_mutex);
-+ pthread_cleanup_push(pthread_cleanup_mutex_lock, &time_mutex);
- #endif
-
- if ((limited_faking &&
-@@ -2078,7 +2088,8 @@ int fake_clock_gettime(clockid_t clk_id, struct timespec *tp)
-
- if (NULL != (tmp_env = getenv("FAKETIME")))
- {
-- strncpy(user_faked_time, tmp_env, BUFFERLEN);
-+ strncpy(user_faked_time, tmp_env, BUFFERLEN - 1);
-+ user_faked_time[BUFFERLEN - 1] = 0;
- }
- else
- {