diff --git a/src/hyperlight_guest/third_party/musl/arch/x86_64/bits/float.h b/src/hyperlight_guest/third_party/musl/arch/x86_64/bits/float.h index 4d8e7864..7b817fec 100644 --- a/src/hyperlight_guest/third_party/musl/arch/x86_64/bits/float.h +++ b/src/hyperlight_guest/third_party/musl/arch/x86_64/bits/float.h @@ -4,6 +4,22 @@ #define FLT_EVAL_METHOD 0 #endif +#ifdef _MSC_VER +#define LDBL_TRUE_MIN 4.9406564584124654e-324 +#define LDBL_MIN 2.2250738585072014e-308 +#define LDBL_MAX 1.7976931348623158e+308 +#define LDBL_EPSILON 2.2204460492503131e-016 + +#define LDBL_MANT_DIG 53 +#define LDBL_MIN_EXP (-1021) +#define LDBL_MAX_EXP 1024 + +#define LDBL_DIG 15 +#define LDBL_MIN_10_EXP (-307) +#define LDBL_MAX_10_EXP308 + +#define DECIMAL_DIG 17 +#else #define LDBL_TRUE_MIN 3.6451995318824746025e-4951L #define LDBL_MIN 3.3621031431120935063e-4932L #define LDBL_MAX 1.1897314953572317650e+4932L @@ -18,3 +34,4 @@ #define LDBL_MAX_10_EXP 4932 #define DECIMAL_DIG 21 +#endif diff --git a/src/hyperlight_guest/third_party/musl/include/math.h b/src/hyperlight_guest/third_party/musl/include/math.h index 14f28ec8..3b6246c1 100644 --- a/src/hyperlight_guest/third_party/musl/include/math.h +++ b/src/hyperlight_guest/third_party/musl/include/math.h @@ -11,7 +11,7 @@ extern "C" { #define __NEED_double_t #include -#if 100*__GNUC__+__GNUC_MINOR__ >= 303 +#if 100*__GNUC__+__GNUC_MINOR__ >= 303 || defined (__clang__) && defined(_MSC_VER) #define NAN __builtin_nanf("") #define INFINITY __builtin_inff() #else diff --git a/src/hyperlight_guest/third_party/musl/include/stdio.h b/src/hyperlight_guest/third_party/musl/include/stdio.h index cb858618..375cd8cd 100644 --- a/src/hyperlight_guest/third_party/musl/include/stdio.h +++ b/src/hyperlight_guest/third_party/musl/include/stdio.h @@ -59,6 +59,8 @@ typedef union _G_fpos64_t { double __align; } fpos_t; +#ifndef HYPERLIGHT + extern FILE *const stdin; extern FILE *const stdout; extern FILE *const stderr; @@ -221,4 +223,6 @@ FILE *fopencookie(void *, const char *, cookie_io_functions_t); } #endif +#endif //HYPERLIGHT + #endif diff --git a/src/hyperlight_guest/third_party/musl/include/stdlib.h b/src/hyperlight_guest/third_party/musl/include/stdlib.h index 475190bf..b23d5721 100644 --- a/src/hyperlight_guest/third_party/musl/include/stdlib.h +++ b/src/hyperlight_guest/third_party/musl/include/stdlib.h @@ -34,16 +34,19 @@ unsigned long strtoul (const char *__restrict, char **__restrict, int); long long strtoll (const char *__restrict, char **__restrict, int); unsigned long long strtoull (const char *__restrict, char **__restrict, int); -int rand (void); -void srand (unsigned); - +// These 5 functions are implemented in rust in hyperlight_guest +_Noreturn void abort (void); void *malloc (size_t); void *calloc (size_t, size_t); void *realloc (void *, size_t); void free (void *); + +#ifndef HYPERLIGHT +int rand (void); +void srand (unsigned); + void *aligned_alloc(size_t, size_t); -_Noreturn void abort (void); int atexit (void (*) (void)); _Noreturn void exit (int); _Noreturn void _Exit (int); @@ -53,6 +56,7 @@ _Noreturn void quick_exit (int); char *getenv (const char *); int system (const char *); +#endif // HYPERLIGHT void *bsearch (const void *, const void *, size_t, size_t, int (*)(const void *, const void *)); void qsort (void *, size_t, size_t, int (*)(const void *, const void *)); @@ -84,9 +88,9 @@ size_t __ctype_get_mb_cur_max(void); #define RAND_MAX (0x7fffffff) -#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \ +#if (defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \ || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \ - || defined(_BSD_SOURCE) + || defined(_BSD_SOURCE)) && !defined(HYPERLIGHT) #define WNOHANG 1 #define WUNTRACED 2 @@ -110,8 +114,8 @@ int rand_r (unsigned *); #endif -#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \ - || defined(_BSD_SOURCE) +#if (defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \ + || defined(_BSD_SOURCE)) && !defined(HYPERLIGHT) char *realpath (const char *__restrict, char *__restrict); long int random (void); void srandom (unsigned int); @@ -136,8 +140,8 @@ unsigned short *seed48 (unsigned short [3]); void lcong48 (unsigned short [7]); #endif -#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) #include +#if (defined(_GNU_SOURCE) || defined(_BSD_SOURCE)) && !defined(HYPERLIGHT) char *mktemp (char *); int mkstemps (char *, int); int mkostemps (char *, int, int); diff --git a/src/hyperlight_guest/third_party/musl/include/sys/time.h b/src/hyperlight_guest/third_party/musl/include/sys/time.h index cdc67ef6..8d98aed3 100644 --- a/src/hyperlight_guest/third_party/musl/include/sys/time.h +++ b/src/hyperlight_guest/third_party/musl/include/sys/time.h @@ -19,20 +19,24 @@ struct itimerval { struct timeval it_value; }; -int getitimer (int, struct itimerval *); -int setitimer (int, const struct itimerval *__restrict, struct itimerval *__restrict); -int utimes (const char *, const struct timeval [2]); - #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) struct timezone { int tz_minuteswest; int tz_dsttime; }; + +#ifndef HYPERLIGHT +int getitimer (int, struct itimerval *); +int setitimer (int, const struct itimerval *__restrict, struct itimerval *__restrict); +int utimes (const char *, const struct timeval [2]); + int futimes(int, const struct timeval [2]); int futimesat(int, const char *, const struct timeval [2]); int lutimes(const char *, const struct timeval [2]); int settimeofday(const struct timeval *, const struct timezone *); int adjtime (const struct timeval *, struct timeval *); +#endif // HYPERLIGHT + #define timerisset(t) ((t)->tv_sec || (t)->tv_usec) #define timerclear(t) ((t)->tv_sec = (t)->tv_usec = 0) #define timercmp(s,t,op) ((s)->tv_sec == (t)->tv_sec ? \ diff --git a/src/hyperlight_guest/third_party/musl/include/time.h b/src/hyperlight_guest/third_party/musl/include/time.h index 3d948372..242abd4a 100644 --- a/src/hyperlight_guest/third_party/musl/include/time.h +++ b/src/hyperlight_guest/third_party/musl/include/time.h @@ -51,6 +51,7 @@ struct tm { const char *__tm_zone; }; +#ifndef HYPERLIGHT clock_t clock (void); time_t time (time_t *); double difftime (time_t, time_t); @@ -61,14 +62,15 @@ struct tm *localtime (const time_t *); char *asctime (const struct tm *); char *ctime (const time_t *); int timespec_get(struct timespec *, int); +#endif // HYPERLIGHT #define CLOCKS_PER_SEC 1000000L #define TIME_UTC 1 -#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \ +#if (defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \ || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \ - || defined(_BSD_SOURCE) + || defined(_BSD_SOURCE)) && !defined(HYPERLIGHT) size_t strftime_l (char * __restrict, size_t, const char * __restrict, const struct tm * __restrict, locale_t); @@ -118,7 +120,7 @@ extern char *tzname[2]; #endif -#if defined(_XOPEN_SOURCE) || defined(_BSD_SOURCE) || defined(_GNU_SOURCE) +#if (defined(_XOPEN_SOURCE) || defined(_BSD_SOURCE) || defined(_GNU_SOURCE)) && !defined(HYPERLIGHT) char *strptime (const char *__restrict, const char *__restrict, struct tm *__restrict); extern int daylight; extern long timezone; @@ -127,7 +129,7 @@ struct tm *getdate (const char *); #endif -#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) +#if (defined(_GNU_SOURCE) || defined(_BSD_SOURCE)) && !defined(HYPERLIGHT) int stime(const time_t *); time_t timegm(struct tm *); #endif diff --git a/src/hyperlight_guest/third_party/musl/include/wchar.h b/src/hyperlight_guest/third_party/musl/include/wchar.h index ed5d774d..4e9d9cea 100644 --- a/src/hyperlight_guest/third_party/musl/include/wchar.h +++ b/src/hyperlight_guest/third_party/musl/include/wchar.h @@ -58,8 +58,10 @@ wchar_t *wcsncat (wchar_t *__restrict, const wchar_t *__restrict, size_t); int wcscmp (const wchar_t *, const wchar_t *); int wcsncmp (const wchar_t *, const wchar_t *, size_t); +#ifndef HYPERLIGHT int wcscoll(const wchar_t *, const wchar_t *); size_t wcsxfrm (wchar_t *__restrict, const wchar_t *__restrict, size_t); +#endif wchar_t *wcschr (const wchar_t *, wchar_t); wchar_t *wcsrchr (const wchar_t *, wchar_t); @@ -104,7 +106,7 @@ long long wcstoll (const wchar_t *__restrict, wchar_t **__restrict, int); unsigned long long wcstoull (const wchar_t *__restrict, wchar_t **__restrict, int); - +#ifndef HYPERLIGHT int fwide (FILE *, int); @@ -136,9 +138,10 @@ wchar_t *fgetws (wchar_t *__restrict, int, FILE *__restrict); int fputws (const wchar_t *__restrict, FILE *__restrict); wint_t ungetwc (wint_t, FILE *); +size_t wcsftime (wchar_t *__restrict, size_t, const wchar_t *__restrict, const struct tm *__restrict); +#endif // HYPERLIGHT struct tm; -size_t wcsftime (wchar_t *__restrict, size_t, const wchar_t *__restrict, const struct tm *__restrict); #undef iswdigit @@ -157,6 +160,7 @@ int fputws_unlocked (const wchar_t *__restrict, FILE *__restrict); size_t wcsftime_l (wchar_t *__restrict, size_t, const wchar_t *__restrict, const struct tm *__restrict, locale_t); #endif + #if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \ || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE) FILE *open_wmemstream(wchar_t **, size_t *); diff --git a/src/hyperlight_guest/third_party/musl/src/errno/__errno_location.c b/src/hyperlight_guest/third_party/musl/src/errno/__errno_location.c index 7f9d6027..229f2a71 100644 --- a/src/hyperlight_guest/third_party/musl/src/errno/__errno_location.c +++ b/src/hyperlight_guest/third_party/musl/src/errno/__errno_location.c @@ -1,9 +1,10 @@ #include -#include "pthread_impl.h" + +int errno_val; int *__errno_location(void) { - return &__pthread_self()->errno_val; + return &errno_val; } -weak_alias(__errno_location, ___errno_location); +weak_alias(__errno_location, ___errno_location); \ No newline at end of file diff --git a/src/hyperlight_guest/third_party/musl/src/exit/assert.c b/src/hyperlight_guest/third_party/musl/src/exit/assert.c index 94edd827..8b3c28df 100644 --- a/src/hyperlight_guest/third_party/musl/src/exit/assert.c +++ b/src/hyperlight_guest/third_party/musl/src/exit/assert.c @@ -1,8 +1,9 @@ #include #include +#include "printf.h" _Noreturn void __assert_fail(const char *expr, const char *file, int line, const char *func) { - fprintf(stderr, "Assertion failed: %s (%s: %s: %d)\n", expr, file, func, line); + printf("Assertion failed: %s (%s: %s: %d)\n", expr, file, func, line); abort(); } diff --git a/src/hyperlight_guest/third_party/musl/src/fenv/x86_64/fenv.s b/src/hyperlight_guest/third_party/musl/src/fenv/x86_64/fenv.s index 98d876da..12bbe260 100644 --- a/src/hyperlight_guest/third_party/musl/src/fenv/x86_64/fenv.s +++ b/src/hyperlight_guest/third_party/musl/src/fenv/x86_64/fenv.s @@ -1,5 +1,4 @@ .global feclearexcept -.type feclearexcept,@function feclearexcept: # maintain exceptions in the sse mxcsr, clear x87 exceptions mov %edi,%ecx @@ -20,7 +19,6 @@ feclearexcept: ret .global feraiseexcept -.type feraiseexcept,@function feraiseexcept: and $0x3f,%edi stmxcsr -8(%rsp) @@ -30,8 +28,6 @@ feraiseexcept: ret .global __fesetround -.hidden __fesetround -.type __fesetround,@function __fesetround: push %rax xor %eax,%eax @@ -49,7 +45,6 @@ __fesetround: ret .global fegetround -.type fegetround,@function fegetround: push %rax stmxcsr (%rsp) @@ -59,7 +54,6 @@ fegetround: ret .global fegetenv -.type fegetenv,@function fegetenv: xor %eax,%eax fnstenv (%rdi) @@ -67,7 +61,6 @@ fegetenv: ret .global fesetenv -.type fesetenv,@function fesetenv: xor %eax,%eax inc %rdi @@ -86,7 +79,6 @@ fesetenv: ret .global fetestexcept -.type fetestexcept,@function fetestexcept: and $0x3f,%edi push %rax diff --git a/src/hyperlight_guest/third_party/musl/src/internal/stdio_impl.h b/src/hyperlight_guest/third_party/musl/src/internal/stdio_impl.h index 0b2438d6..5e6ac39d 100644 --- a/src/hyperlight_guest/third_party/musl/src/internal/stdio_impl.h +++ b/src/hyperlight_guest/third_party/musl/src/internal/stdio_impl.h @@ -2,6 +2,7 @@ #define _STDIO_IMPL_H #include +#ifndef HYPERLIGHT #include "syscall.h" #define UNGET 8 @@ -9,6 +10,7 @@ #define FFINALLOCK(f) ((f)->lock>=0 ? __lockfile((f)) : 0) #define FLOCK(f) int __need_unlock = ((f)->lock>=0 ? __lockfile((f)) : 0) #define FUNLOCK(f) do { if (__need_unlock) __unlockfile((f)); } while (0) +#endif // HYPERLIGHT #define F_PERM 1 #define F_NORD 4 @@ -47,6 +49,11 @@ struct _IO_FILE { struct __locale_struct *locale; }; +hidden int __toread(FILE *); +hidden int __towrite(FILE *); +int __uflow(FILE *); + +#ifndef HYPERLIGHT extern hidden FILE *volatile __stdin_used; extern hidden FILE *volatile __stdout_used; extern hidden FILE *volatile __stderr_used; @@ -60,16 +67,13 @@ hidden size_t __stdout_write(FILE *, const unsigned char *, size_t); hidden off_t __stdio_seek(FILE *, off_t, int); hidden int __stdio_close(FILE *); -hidden int __toread(FILE *); -hidden int __towrite(FILE *); - hidden void __stdio_exit(void); hidden void __stdio_exit_needed(void); #if defined(__PIC__) && (100*__GNUC__+__GNUC_MINOR__ >= 303) __attribute__((visibility("protected"))) #endif -int __overflow(FILE *, int), __uflow(FILE *); +int __overflow(FILE *, int); hidden int __fseeko(FILE *, off_t, int); hidden int __fseeko_unlocked(FILE *, off_t, int); @@ -110,3 +114,4 @@ hidden FILE *__fopen_rb_ca(const char *, FILE *, unsigned char *, size_t); hidden int __fclose_ca(FILE *); #endif +#endif diff --git a/src/hyperlight_guest/third_party/musl/src/math/x86_64/acosl.s b/src/hyperlight_guest/third_party/musl/src/math/x86_64/acosl.s index 88e01b49..5f6c3f55 100644 --- a/src/hyperlight_guest/third_party/musl/src/math/x86_64/acosl.s +++ b/src/hyperlight_guest/third_party/musl/src/math/x86_64/acosl.s @@ -1,7 +1,6 @@ # see ../i386/acos.s .global acosl -.type acosl,@function acosl: fldt 8(%rsp) 1: fld %st(0) diff --git a/src/hyperlight_guest/third_party/musl/src/math/x86_64/asinl.s b/src/hyperlight_guest/third_party/musl/src/math/x86_64/asinl.s index ed212d9a..34cc3815 100644 --- a/src/hyperlight_guest/third_party/musl/src/math/x86_64/asinl.s +++ b/src/hyperlight_guest/third_party/musl/src/math/x86_64/asinl.s @@ -1,5 +1,4 @@ .global asinl -.type asinl,@function asinl: fldt 8(%rsp) 1: fld %st(0) diff --git a/src/hyperlight_guest/third_party/musl/src/math/x86_64/atan2l.s b/src/hyperlight_guest/third_party/musl/src/math/x86_64/atan2l.s index e5f0a3de..8b5e52e5 100644 --- a/src/hyperlight_guest/third_party/musl/src/math/x86_64/atan2l.s +++ b/src/hyperlight_guest/third_party/musl/src/math/x86_64/atan2l.s @@ -1,5 +1,4 @@ .global atan2l -.type atan2l,@function atan2l: fldt 8(%rsp) fldt 24(%rsp) diff --git a/src/hyperlight_guest/third_party/musl/src/math/x86_64/atanl.s b/src/hyperlight_guest/third_party/musl/src/math/x86_64/atanl.s index df76de5d..25c3723a 100644 --- a/src/hyperlight_guest/third_party/musl/src/math/x86_64/atanl.s +++ b/src/hyperlight_guest/third_party/musl/src/math/x86_64/atanl.s @@ -1,5 +1,4 @@ .global atanl -.type atanl,@function atanl: fldt 8(%rsp) fld1 diff --git a/src/hyperlight_guest/third_party/musl/src/math/x86_64/exp2l.s b/src/hyperlight_guest/third_party/musl/src/math/x86_64/exp2l.s index effab2bd..02a3f71a 100644 --- a/src/hyperlight_guest/third_party/musl/src/math/x86_64/exp2l.s +++ b/src/hyperlight_guest/third_party/musl/src/math/x86_64/exp2l.s @@ -1,5 +1,4 @@ .global expm1l -.type expm1l,@function expm1l: fldt 8(%rsp) fldl2e @@ -28,7 +27,6 @@ expm1l: ret .global exp2l -.type exp2l,@function exp2l: fldt 8(%rsp) 1: fld %st(0) diff --git a/src/hyperlight_guest/third_party/musl/src/math/x86_64/expl.s b/src/hyperlight_guest/third_party/musl/src/math/x86_64/expl.s index 798261d2..3b82d132 100644 --- a/src/hyperlight_guest/third_party/musl/src/math/x86_64/expl.s +++ b/src/hyperlight_guest/third_party/musl/src/math/x86_64/expl.s @@ -4,7 +4,6 @@ # using the exact multiplication method of Dekker and Veltkamp .global expl -.type expl,@function expl: fldt 8(%rsp) diff --git a/src/hyperlight_guest/third_party/musl/src/math/x86_64/floorl.s b/src/hyperlight_guest/third_party/musl/src/math/x86_64/floorl.s index 80da4660..f8f1ed35 100644 --- a/src/hyperlight_guest/third_party/musl/src/math/x86_64/floorl.s +++ b/src/hyperlight_guest/third_party/musl/src/math/x86_64/floorl.s @@ -1,5 +1,4 @@ .global floorl -.type floorl,@function floorl: fldt 8(%rsp) 1: mov $0x7,%al @@ -13,14 +12,12 @@ floorl: ret .global ceill -.type ceill,@function ceill: fldt 8(%rsp) mov $0xb,%al jmp 1b .global truncl -.type truncl,@function truncl: fldt 8(%rsp) mov $0xf,%al diff --git a/src/hyperlight_guest/third_party/musl/src/math/x86_64/log10l.s b/src/hyperlight_guest/third_party/musl/src/math/x86_64/log10l.s index 48ea4af7..85985513 100644 --- a/src/hyperlight_guest/third_party/musl/src/math/x86_64/log10l.s +++ b/src/hyperlight_guest/third_party/musl/src/math/x86_64/log10l.s @@ -1,5 +1,4 @@ .global log10l -.type log10l,@function log10l: fldlg2 fldt 8(%rsp) diff --git a/src/hyperlight_guest/third_party/musl/src/math/x86_64/log1pl.s b/src/hyperlight_guest/third_party/musl/src/math/x86_64/log1pl.s index 955c9dbf..6b7e70b0 100644 --- a/src/hyperlight_guest/third_party/musl/src/math/x86_64/log1pl.s +++ b/src/hyperlight_guest/third_party/musl/src/math/x86_64/log1pl.s @@ -1,5 +1,4 @@ .global log1pl -.type log1pl,@function log1pl: mov 14(%rsp),%eax fldln2 diff --git a/src/hyperlight_guest/third_party/musl/src/math/x86_64/log2l.s b/src/hyperlight_guest/third_party/musl/src/math/x86_64/log2l.s index ba08b9fb..c8298ad5 100644 --- a/src/hyperlight_guest/third_party/musl/src/math/x86_64/log2l.s +++ b/src/hyperlight_guest/third_party/musl/src/math/x86_64/log2l.s @@ -1,5 +1,4 @@ .global log2l -.type log2l,@function log2l: fld1 fldt 8(%rsp) diff --git a/src/hyperlight_guest/third_party/musl/src/math/x86_64/logl.s b/src/hyperlight_guest/third_party/musl/src/math/x86_64/logl.s index 20dd1f81..6511215e 100644 --- a/src/hyperlight_guest/third_party/musl/src/math/x86_64/logl.s +++ b/src/hyperlight_guest/third_party/musl/src/math/x86_64/logl.s @@ -1,5 +1,4 @@ .global logl -.type logl,@function logl: fldln2 fldt 8(%rsp) diff --git a/src/hyperlight_guest/third_party/musl/src/stdio/__toread.c b/src/hyperlight_guest/third_party/musl/src/stdio/__toread.c index f142ff09..e5206294 100644 --- a/src/hyperlight_guest/third_party/musl/src/stdio/__toread.c +++ b/src/hyperlight_guest/third_party/musl/src/stdio/__toread.c @@ -13,7 +13,9 @@ int __toread(FILE *f) return (f->flags & F_EOF) ? EOF : 0; } +#ifndef HYPERLIGHT hidden void __toread_needs_stdio_exit() { __stdio_exit_needed(); } +#endif diff --git a/src/hyperlight_guest/third_party/musl/src/stdio/__towrite.c b/src/hyperlight_guest/third_party/musl/src/stdio/__towrite.c index 4c9c66ae..8ca54ca1 100644 --- a/src/hyperlight_guest/third_party/musl/src/stdio/__towrite.c +++ b/src/hyperlight_guest/third_party/musl/src/stdio/__towrite.c @@ -17,7 +17,9 @@ int __towrite(FILE *f) return 0; } +#ifndef HYPERLIGHT hidden void __towrite_needs_stdio_exit() { __stdio_exit_needed(); } +#endif diff --git a/src/hyperlight_guest/third_party/musl/src/stdlib/ecvt.c b/src/hyperlight_guest/third_party/musl/src/stdlib/ecvt.c index 797b664e..fad5391e 100644 --- a/src/hyperlight_guest/third_party/musl/src/stdlib/ecvt.c +++ b/src/hyperlight_guest/third_party/musl/src/stdlib/ecvt.c @@ -1,6 +1,7 @@ #define _GNU_SOURCE #include #include +#include "printf.h" char *ecvt(double x, int n, int *dp, int *sign) { diff --git a/src/hyperlight_guest/third_party/musl/src/stdlib/fcvt.c b/src/hyperlight_guest/third_party/musl/src/stdlib/fcvt.c index f90928fe..59ead8c3 100644 --- a/src/hyperlight_guest/third_party/musl/src/stdlib/fcvt.c +++ b/src/hyperlight_guest/third_party/musl/src/stdlib/fcvt.c @@ -2,6 +2,7 @@ #include #include #include +#include "printf.h" char *fcvt(double x, int n, int *dp, int *sign) { diff --git a/src/hyperlight_guest/third_party/musl/src/stdlib/gcvt.c b/src/hyperlight_guest/third_party/musl/src/stdlib/gcvt.c index f29bc304..bd5e19c8 100644 --- a/src/hyperlight_guest/third_party/musl/src/stdlib/gcvt.c +++ b/src/hyperlight_guest/third_party/musl/src/stdlib/gcvt.c @@ -1,6 +1,7 @@ #define _GNU_SOURCE #include #include +#include "printf.h" char *gcvt(double x, int n, char *b) {