forked from github/server
compiles with gcc on rpi
This commit is contained in:
parent
ba2f35e44f
commit
f8ff9ffda5
|
@ -448,7 +448,7 @@ static void test_configs(CuTest * tc)
|
|||
CuAssertPtrEquals(tc, 0, buildingtypes);
|
||||
json_config(json);
|
||||
CuAssertPtrNotNull(tc, buildingtypes);
|
||||
if (unlink("test.json")!=0 && errno==ENOENT) {
|
||||
if (remove("test.json")!=0 && errno==ENOENT) {
|
||||
errno = 0;
|
||||
}
|
||||
cJSON_Delete(json);
|
||||
|
|
|
@ -1830,7 +1830,7 @@ int writegame(const char *filename)
|
|||
join_path(datapath(), filename, path, sizeof(path));
|
||||
#ifdef HAVE_UNISTD_H
|
||||
/* make sure we don't overwrite an existing file (hard links) */
|
||||
if (unlink(path)!=0) {
|
||||
if (remove(path)!=0) {
|
||||
if (errno==ENOENT) {
|
||||
errno = 0;
|
||||
}
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
#endif
|
||||
#define NO_STRDUP
|
||||
#define NO_MKDIR
|
||||
#define NO_UNLINK
|
||||
#define _CRT_SECURE_NO_WARNINGS
|
||||
#pragma warning(disable: 4710 4820)
|
||||
#pragma warning(disable: 4100) // unreferenced formal parameter
|
||||
|
@ -38,7 +37,4 @@ char * strdup(const char *s);
|
|||
int mkdir(const char *pathname, int mode);
|
||||
#endif
|
||||
|
||||
#ifdef NO_UNLINK
|
||||
int unlink(const char *pathname);
|
||||
#endif
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue