".previous")
#define ADDED_IN_10_12(sym) WEAK_SYMBOL_LD_CMD(sym, 10.11)
+#define ADDED_IN_10_13(sym) WEAK_SYMBOL_LD_CMD(sym, 10.12)
ADDED_IN_10_12(getentropy);
ADDED_IN_10_12(timingsafe_bcmp);
+ADDED_IN_10_13(utimensat);
+
#endif /* TARGET_OS_IPHONE */
int ret = __settimeofday(tp, tzp);
if (ret == 0) notify_post(kNotifyClockSet);
- char *msg = NULL;
- asprintf(&msg, "settimeofday({%#lx,%#x}) == %d", tp->tv_sec, tp->tv_usec, ret);
- _simple_asl_log(ASL_LEVEL_NOTICE, "com.apple.settimeofday", msg);
- free(msg);
+ if (tp) {
+ char *msg = NULL;
+ asprintf(&msg, "settimeofday({%#lx,%#x}) == %d", tp->tv_sec, tp->tv_usec, ret);
+ _simple_asl_log(ASL_LEVEL_NOTICE, "com.apple.settimeofday", msg);
+ free(msg);
+ }
return ret;
}
#include <string.h>
#include <locale.h>
#include <err.h>
+#include <TargetConditionals.h>
#include <darwintest.h>
T_EXPECT_EQ(percent_j_out, standard_out, NULL);
}
+#if !TARGET_OS_BRIDGE
T_DECL(strptime_PR_5879606, "alloca(strlen(input)) in strptime(\"%Z\")")
{
struct tm tm;
T_EXPECT_EQ(tm.tm_wday, 0x2, NULL);
T_EXPECT_EQ(tm.tm_yday, 0x83, NULL);
}
+#endif
T_DECL(strptime_lukemftp, "year parsing"){
struct tm tm;
}
}
+#if !TARGET_OS_BRIDGE
T_DECL(strptime_asctime, "strptime->asctime")
{
char *test[] = {
i++;
}
}
+#endif