This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch main
in repository eternity.
View the commit online.
commit ce58b843d9cbdf558328300c0a15b0ec0a6db760
Author: Alastair Poole <[email protected]>
AuthorDate: Wed Nov 25 21:40:42 2026 +0000
build fix
---
src/lib/eternity_clock.c | 2 +-
src/lib/eternity_compat.h | 18 +++++++++++-------
2 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/src/lib/eternity_clock.c b/src/lib/eternity_clock.c
index 8d2ec2b..7d05289 100644
--- a/src/lib/eternity_clock.c
+++ b/src/lib/eternity_clock.c
@@ -77,7 +77,7 @@ eternity_clock_time_get(const char *zone, time_t now, struct tm *result)
current = getenv("TZ");
saved = current ? strdup(current) : NULL;
if (current && !saved) return EINA_FALSE;
- if (eternity_setenv("TZ", tz, 1))
+ if (!eternity_setenv("TZ", tz, 1))
{
free(saved);
diff --git a/src/lib/eternity_compat.h b/src/lib/eternity_compat.h
index b6ff803..b091668 100644
--- a/src/lib/eternity_compat.h
+++ b/src/lib/eternity_compat.h
@@ -5,11 +5,15 @@
#include <stdlib.h>
#include <time.h>
-#ifndef WIN32_LEAN_AND_MEAN
-# define WIN32_LEAN_AND_MEAN
+#ifdef _WIN32
+# ifndef WIN32_LEAN_AND_MEAN
+# define WIN32_LEAN_AND_MEAN
+# include <windows.h>
+# undef WIN32_LEAN_AND_MEAN
+# else
+# include <windows.h>
+# endif
#endif
-#include <windows.h>
-#undef WIN32_LEAN_AND_MEAN
static inline bool eternity_localtime(const time_t *timep, struct tm *result)
{
@@ -35,7 +39,7 @@ static inline bool eternity_setenv(const char *name, const char *value, int over
if (overwrite)
SetEnvironmentVariable(name, NULL);
- return SetEnvironmentVariable(name, value) == 0;
+ return SetEnvironmentVariable(name, value) != 0;
#else
return setenv(name, value, overwrite) == 0;
#endif
@@ -44,9 +48,9 @@ static inline bool eternity_setenv(const char *name, const char *value, int over
static inline bool eternity_unsetenv(const char *name)
{
#ifdef _WIN32
- return SetEnvironmentVariable(name, NULL) == 0;
+ return SetEnvironmentVariable(name, NULL) != 0;
#else
- return unsetenv(name);
+ return unsetenv(name) == 0;
#endif
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.