diskutil: include limits.h for PATH_MAX
authorJens Axboe <axboe@kernel.dk>
Wed, 16 Feb 2022 00:11:06 +0000 (17:11 -0700)
committerJens Axboe <axboe@kernel.dk>
Wed, 16 Feb 2022 00:17:30 +0000 (17:17 -0700)
On OmniOS, compilation fails because of a missing PATH_MAX definition:

$ gmake
    CC cconv.o
In file included from stat.h:6:0,
                 from thread_options.h:7,
                 from cconv.c:4:
diskutil.h:52:12: error: 'PATH_MAX' undeclared here (not in a function); did you mean 'INT8_MAX'?
  char path[PATH_MAX];
            ^~~~~~~~
            INT8_MAX
gmake: *** [Makefile:505: cconv.o] Error 1

Add limits.h to fix that.

Link: https://github.com/axboe/fio/issues/1344
Signed-off-by: Jens Axboe <axboe@kernel.dk>
diskutil.h

index 83bcbf895e799f989645d86cbc23f0dbdf698f39..7d7ef802bfa1424530c333672a5b96223c12a48b 100644 (file)
@@ -2,6 +2,8 @@
 #define FIO_DISKUTIL_H
 #define FIO_DU_NAME_SZ         64
 
+#include <limits.h>
+
 #include "helper_thread.h"
 #include "fio_sem.h"