History

autofs: move inclusion of linux/limits.h to uapi

linux/limits.h should be included by uapi instead of linux/auto_fs.h so as not to cause compile error in userspace. # cat << EOF > ./test1.c > #include <stdio.h> > #include <linux/auto_fs.h> > int main(void) { > return 0; > } > EOF # gcc -Wall -g ./test1.c In file included from ./test1.c:2:0: /usr/include/linux/auto_fs.h:54:12: error: 'NAME_MAX' undeclared here (not in a function) char name[NAME_MAX+1]; ^

Tomohiro Kusumi committed 10 years ago

Commit f58b3c91 parent 39085552 files · +1 −1Browse files

Showing the changes to include/uapi/linux (1 of 2 files). Show all

Unified · Split

include/uapi/linux/auto_fs.h+1−0
@@ -12,6 +12,7 @@ · 11 unmodified lines
12#define _UAPI_LINUX_AUTO_FS_H12#define _UAPI_LINUX_AUTO_FS_H
13 13
14#include <linux/types.h>14#include <linux/types.h>
15#include <linux/limits.h>
15#ifndef __KERNEL__16#ifndef __KERNEL__
16#include <sys/ioctl.h>17#include <sys/ioctl.h>
17#endif /* __KERNEL__ */18#endif /* __KERNEL__ */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t