CROSS_TO_WASM build fixes
This commit is contained in:
+28
-2
@@ -51,7 +51,7 @@ extern void init_linux_cons(void);
|
||||
|
||||
static void wd_message(void);
|
||||
static struct passwd *get_unix_pw(void);
|
||||
ATTRNORETURN static void opt_terminate(void) NORETURN;
|
||||
/* ATTRNORETURN static void opt_terminate(void) NORETURN; */
|
||||
|
||||
#ifdef __EMSCRIPTEN__
|
||||
/* if WebAssembly, export this API and don't optimize it out */
|
||||
@@ -769,6 +769,8 @@ sys_random_seed(void)
|
||||
return seed;
|
||||
}
|
||||
|
||||
#if 0
|
||||
/* now found in earlyarg.c */
|
||||
/* for command-line options that perform some immediate action and then
|
||||
terminate the program without starting play, like 'nethack --version'
|
||||
or 'nethack -s Zelda'; do some cleanup before that termination */
|
||||
@@ -780,7 +782,6 @@ opt_terminate(void)
|
||||
nh_terminate(EXIT_SUCCESS);
|
||||
/*NOTREACHED*/
|
||||
}
|
||||
|
||||
/* show the sysconf file name, playground directory, run-time configuration
|
||||
file name, dumplog file name if applicable, and some other things */
|
||||
ATTRNORETURN void
|
||||
@@ -794,6 +795,31 @@ after_opt_showpaths(const char *dir)
|
||||
opt_terminate();
|
||||
/*NOTREACHED*/
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
get_nhuuid(void)
|
||||
{
|
||||
unsigned char stmp[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||
|
||||
if (svn.nhuuid[0])
|
||||
return;
|
||||
|
||||
/* FIXME: fill in a useful valid UUID somehow */
|
||||
Snprintf(svn.nhuuid, sizeof svn.nhuuid, "%s", (char *) stmp);
|
||||
}
|
||||
|
||||
void
|
||||
free_nhuuid(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < SIZE(svn.nhuuid); i++) {
|
||||
svn.nhuuid[i] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef __EMSCRIPTEN__
|
||||
/***
|
||||
|
||||
Reference in New Issue
Block a user