Skip to contentSkip to conversation

dma-buf: Include ioctl.h in UAPI header

PATCH In review Isaac J. Manjarres 3 participants 3 messages Mar 3 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dma-buf: Include ioctl.h in UAPI header

include/uapi/linux/dma-buf.h uses several macros from ioctl.h to define its ioctl commands. However, it does not include ioctl.h itself. So, if userspace source code tries to include the dma-buf.h file without including ioctl.h, it can result in build failures.

Therefore, include ioctl.h in the dma-buf UAPI header.

---
 include/uapi/linux/dma-buf.h | 1 +
 1 file changed, 1 insertion(+)
include/uapi/linux/dma-buf.h +1 -0
index 5a6fda66d9ad..e827c9d20c5d 100644
@@ -20,6 +20,7 @@
 #ifndef _DMA_BUF_UAPI_H_
 #define _DMA_BUF_UAPI_H_
 
+#include <linux/ioctl.h>
 #include <linux/types.h>
 
 /**
Signature · 1 line
2.53.0.473.g4a7958ca14-goog
Reviewed-by on v1 1/1
#1 lore raw
Quoted 9 lines · Isaac J. Manjarres

include/uapi/linux/dma-buf.h uses several macros from ioctl.h to define its ioctl commands. However, it does not include ioctl.h itself. So, if userspace source code tries to include the dma-buf.h file without including ioctl.h, it can result in build failures.

Therefore, include ioctl.h in the dma-buf UAPI header.

Reviewed-by
#2 lore raw
Quoted 8 lines · T.J. Mercier
Quoted 6 lines · Isaac J. Manjarres

include/uapi/linux/dma-buf.h uses several macros from ioctl.h to define its ioctl commands. However, it does not include ioctl.h itself. So, if userspace source code tries to include the dma-buf.h file without including ioctl.h, it can result in build failures.

Quoted 5 lines
Quoted 3 lines

Therefore, include ioctl.h in the dma-buf UAPI header.

Going to push that to drm-misc-fixes now.

Thanks,
Christian.