wscript: Add check for --wrap linker flag
[vlendec/samba-autobuild/.git] / source3 / rpc_client / init_spoolss.c
index a806fc6ce09a44be7a08de62cdfefee044c86105..9a4dab6d417176cde4626946b5f203036ad76cec 100644 (file)
@@ -48,15 +48,15 @@ bool init_systemtime(struct spoolss_Time *r,
 
 time_t spoolss_Time_to_time_t(const struct spoolss_Time *r)
 {
-       struct tm unixtime;
-
-       unixtime.tm_year        = r->year - 1900;
-       unixtime.tm_mon         = r->month - 1;
-       unixtime.tm_wday        = r->day_of_week;
-       unixtime.tm_mday        = r->day;
-       unixtime.tm_hour        = r->hour;
-       unixtime.tm_min         = r->minute;
-       unixtime.tm_sec         = r->second;
+       struct tm unixtime = {
+               .tm_year        = r->year - 1900,
+               .tm_mon         = r->month - 1,
+               .tm_wday        = r->day_of_week,
+               .tm_mday        = r->day,
+               .tm_hour        = r->hour,
+               .tm_min         = r->minute,
+               .tm_sec         = r->second,
+       };
 
        return mktime(&unixtime);
 }
@@ -435,3 +435,14 @@ WERROR spoolss_create_default_secdesc(TALLOC_CTX *mem_ctx,
 
        return WERR_OK;
 }
+
+const char *spoolss_get_short_filesys_environment(const char *environment)
+{
+       if (strequal(environment, SPOOLSS_ARCHITECTURE_x64)) {
+               return "amd64";
+       } else if (strequal(environment, SPOOLSS_ARCHITECTURE_NT_X86)) {
+               return "x86";
+       } else {
+               return NULL;
+       }
+}