aboutsummaryrefslogtreecommitdiff
path: root/src/gb
diff options
context:
space:
mode:
authorGinger Bill <bill@gingerbill.org>2017-08-11 00:16:57 +0100
committerGinger Bill <bill@gingerbill.org>2017-08-11 00:16:57 +0100
commitd7bd3f8402e86d020ff5bb9dda3f9a2da2d3a07c (patch)
tree414ffed3e9b176499fa7be104e30e3a9e4b63640 /src/gb
parent0fff6a2b74fb415e30a6b9ae104e204ffe799cbe (diff)
Fix compilation issues on OSX
Diffstat (limited to 'src/gb')
-rw-r--r--src/gb/gb.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/gb/gb.h b/src/gb/gb.h
index de7af93c0..3386d529b 100644
--- a/src/gb/gb.h
+++ b/src/gb/gb.h
@@ -7984,15 +7984,17 @@ gb_inline b32 gb_file_copy(char const *existing_filename, char const *new_filena
gb_inline b32 gb_file_move(char const *existing_filename, char const *new_filename) {
if (link(existing_filename, new_filename) == 0) {
- if (unlink(existing_filename) != -1) {
- return true;
- }
+ return unlink(existing_filename) != -1;
}
return false;
}
b32 gb_file_remove(char const *filename) {
+#if defined(GB_SYSTEM_OSX)
+ return unlink(existing_filename) != -1;
+#else
return remove(filename) == 0;
+#endif
}