[PATCH v1] dma-buf: Include ioctl.h in UAPI header

Isaac J. Manjarres posted 1 patch 1 month, 1 week ago
There is a newer version of this series
include/uapi/linux/dma-buf.h | 1 +
1 file changed, 1 insertion(+)
[PATCH v1] dma-buf: Include ioctl.h in UAPI header
Posted by Isaac J. Manjarres 1 month, 1 week ago
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.

Signed-off-by: Isaac J. Manjarres <isaacmanjarres@google.com>
---
 include/uapi/linux/dma-buf.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/uapi/linux/dma-buf.h b/include/uapi/linux/dma-buf.h
index 5a6fda66d9ad..e827c9d20c5d 100644
--- a/include/uapi/linux/dma-buf.h
+++ b/include/uapi/linux/dma-buf.h
@@ -20,6 +20,7 @@
 #ifndef _DMA_BUF_UAPI_H_
 #define _DMA_BUF_UAPI_H_
 
+#include <linux/ioctl.h>
 #include <linux/types.h>
 
 /**
-- 
2.53.0.473.g4a7958ca14-goog
Re: [PATCH v1] dma-buf: Include ioctl.h in UAPI header
Posted by T.J. Mercier 1 month, 1 week ago
On Mon, Mar 2, 2026 at 4:23 PM Isaac J. Manjarres
<isaacmanjarres@google.com> wrote:
>
> 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.
>
> Signed-off-by: Isaac J. Manjarres <isaacmanjarres@google.com>

Reviewed-by: T.J. Mercier <tjmercier@google.com>
Re: [PATCH v1] dma-buf: Include ioctl.h in UAPI header
Posted by Christian König 1 month, 1 week ago
On 3/3/26 02:45, T.J. Mercier wrote:
> On Mon, Mar 2, 2026 at 4:23 PM Isaac J. Manjarres
> <isaacmanjarres@google.com> wrote:
>>
>> 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.
>>
>> Signed-off-by: Isaac J. Manjarres <isaacmanjarres@google.com>
> 
> Reviewed-by: T.J. Mercier <tjmercier@google.com>

Reviewed-by: Christian König <christian.koenig@amd.com>

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

Thanks,
Christian.