summaryrefslogtreecommitdiffstats
path: root/src/util
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2017-03-06 13:25:59 +1100
committerTimothy Arceri <[email protected]>2017-03-06 16:39:55 +1100
commit6b657cecd52649b1a8735cd143998280cfa130f3 (patch)
tree70237ef4117f8bfe3e272c3aaa8a94adf432c8b3 /src/util
parent2e73ccb485b968a6d3b46d7b30611e9e49aa9473 (diff)
util/disk_cache: fix make check
Fixes make check after 11f0efec2e615f5233d which caused disk cache to create an additional directory.
Diffstat (limited to 'src/util')
-rw-r--r--src/util/disk_cache.c17
-rw-r--r--src/util/disk_cache.h18
2 files changed, 18 insertions, 17 deletions
diff --git a/src/util/disk_cache.c b/src/util/disk_cache.c
index 9a7c5c94350..31a93365825 100644
--- a/src/util/disk_cache.c
+++ b/src/util/disk_cache.c
@@ -74,23 +74,6 @@ struct disk_cache {
uint64_t max_size;
};
-static const char *
-get_arch_bitness_str(void)
-{
- if (sizeof(void *) == 4)
-#ifdef __ILP32__
- return "ilp-32";
-#else
- return "32";
-#endif
- if (sizeof(void *) == 8)
- return "64";
-
- /* paranoia check which will be dropped by the optimiser */
- assert(!"unknown_arch");
- return "unknown_arch";
-}
-
/* Create a directory named 'path' if it does not already exist.
*
* Returns: 0 if path already exists as a directory or if created.
diff --git a/src/util/disk_cache.h b/src/util/disk_cache.h
index 63ab9b35e2c..3659b6dc358 100644
--- a/src/util/disk_cache.h
+++ b/src/util/disk_cache.h
@@ -27,6 +27,7 @@
#ifdef ENABLE_SHADER_CACHE
#include <dlfcn.h>
#endif
+#include <assert.h>
#include <stdint.h>
#include <stdbool.h>
#include <sys/stat.h>
@@ -42,6 +43,23 @@ typedef uint8_t cache_key[CACHE_KEY_SIZE];
struct disk_cache;
+static inline const char *
+get_arch_bitness_str(void)
+{
+ if (sizeof(void *) == 4)
+#ifdef __ILP32__
+ return "ilp-32";
+#else
+ return "32";
+#endif
+ if (sizeof(void *) == 8)
+ return "64";
+
+ /* paranoia check which will be dropped by the optimiser */
+ assert(!"unknown_arch");
+ return "unknown_arch";
+}
+
static inline bool
disk_cache_get_function_timestamp(void *ptr, uint32_t* timestamp)
{