Skip to content

Commit

Permalink
meta: prevent linux_kernel_headers from being set to /usr/include
Browse files Browse the repository at this point in the history
  • Loading branch information
no92 committed Jun 12, 2024
1 parent 3d3f1f1 commit b53df8c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,10 @@ if host_machine.system() == 'linux'
error('linux_kernel_headers is not set')
endif

if fs.is_samepath(get_option('linux_kernel_headers'), '/usr/include')
error('linux_kernel_headers must be set to a Linux kernel header install directory, not your /usr/include')
endif

if not import('fs').is_dir(get_option('linux_kernel_headers'))
error('linux_kernel_headers is not set to a valid path')
endif
Expand Down Expand Up @@ -299,6 +303,10 @@ if not disable_linux_option
error('linux_kernel_headers is not set')
endif

if fs.is_samepath(get_option('linux_kernel_headers'), '/usr/include')
error('linux_kernel_headers must be set to a Linux kernel header install directory, not your /usr/include')
endif

if not import('fs').is_dir(get_option('linux_kernel_headers'))
error('linux_kernel_headers is not set to a valid path')
endif
Expand Down

0 comments on commit b53df8c

Please sign in to comment.