projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Replace MinGW with Windows to avoid ambiguities
[tinc]
/
src
/
fsck.c
diff --git
a/src/fsck.c
b/src/fsck.c
index
3a64959
..
e726272
100644
(file)
--- a/
src/fsck.c
+++ b/
src/fsck.c
@@
-141,8
+141,9
@@
static void check_conffile(const char *nodename, bool server) {
++total_vars;
}
++total_vars;
}
- int count[total_vars];
- memset(count, 0, sizeof(count));
+ const size_t countlen = total_vars * sizeof(int);
+ int *count = alloca(countlen);
+ memset(count, 0, countlen);
for splay_each(config_t, conf, &config) {
int var_type = 0;
for splay_each(config_t, conf, &config) {
int var_type = 0;
@@
-184,7
+185,7
@@
static void check_conffile(const char *nodename, bool server) {
splay_empty_tree(&config);
}
splay_empty_tree(&config);
}
-#ifdef HAVE_
MINGW
+#ifdef HAVE_
WINDOWS
typedef int uid_t;
static uid_t getuid(void) {
typedef int uid_t;
static uid_t getuid(void) {
@@
-218,7
+219,7
@@
static void check_key_file_mode(const char *fname) {
}
}
}
}
}
}
-#endif // HAVE_
MINGW
+#endif // HAVE_
WINDOWS
static char *read_node_name(void) {
if(access(tinc_conf, R_OK) == 0) {
static char *read_node_name(void) {
if(access(tinc_conf, R_OK) == 0) {