blktrace: fix compilation error on the uos system
authorCuelive <93713079+Cuelive@users.noreply.github.com>
Tue, 28 Feb 2023 02:03:21 +0000 (10:03 +0800)
committerqinzhiben <qinzhiben@uniontech.com>
Tue, 28 Feb 2023 08:38:03 +0000 (16:38 +0800)
When compiling on uos, it fails with an undefined reference to 'major'. Fix
this by including the correct header for it.

liuyafei <liuyafei@uniontech.com>

blktrace.c

index d5c8aee70b9f5fbe357094c8894f8ca59ee7d201..ef9ce6bffd8686e1e5f5e7bf4f00828490495c2c 100644 (file)
@@ -5,6 +5,7 @@
 #include <stdlib.h>
 #include <unistd.h>
 #include <errno.h>
+#include <sys/sysmacros.h>
 
 #include "flist.h"
 #include "fio.h"