summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibC
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Libraries/LibC')
-rw-r--r--Userland/Libraries/LibC/netdb.cpp4
-rw-r--r--Userland/Libraries/LibC/time.cpp3
2 files changed, 4 insertions, 3 deletions
diff --git a/Userland/Libraries/LibC/netdb.cpp b/Userland/Libraries/LibC/netdb.cpp
index 33d17b5a21..77d0b790dd 100644
--- a/Userland/Libraries/LibC/netdb.cpp
+++ b/Userland/Libraries/LibC/netdb.cpp
@@ -36,7 +36,7 @@ static constexpr i32 lookup_server_endpoint_magic = 9001;
// Get service entry buffers and file information for the getservent() family of functions.
static FILE* services_file = nullptr;
-static constexpr char services_path[] = "/etc/services";
+static const char* services_path = "/etc/services";
static bool fill_getserv_buffers(const char* line, ssize_t read);
static servent __getserv_buffer;
@@ -50,7 +50,7 @@ static ssize_t service_file_offset = 0;
// Get protocol entry buffers and file information for the getprotent() family of functions.
static FILE* protocols_file = nullptr;
-static constexpr char protocols_path[] = "/etc/protocols";
+static const char* protocols_path = "/etc/protocols";
static bool fill_getproto_buffers(const char* line, ssize_t read);
static protoent __getproto_buffer;
diff --git a/Userland/Libraries/LibC/time.cpp b/Userland/Libraries/LibC/time.cpp
index 738d8ea594..9add36bb76 100644
--- a/Userland/Libraries/LibC/time.cpp
+++ b/Userland/Libraries/LibC/time.cpp
@@ -70,9 +70,10 @@ char* ctime_r(const time_t* t, char* buf)
return asctime_r(localtime_r(t, &tm_buf), buf);
}
+static const int __seconds_per_day = 60 * 60 * 24;
+
static void time_to_tm(struct tm* tm, time_t t)
{
- constexpr int __seconds_per_day = 60 * 60 * 24;
int year = 1970;
for (; t >= days_in_year(year) * __seconds_per_day; ++year)
t -= days_in_year(year) * __seconds_per_day;