Fix OpenBSD build
This commit is contained in:
		
							parent
							
								
									52a28f01c8
								
							
						
					
					
						commit
						c9b003735d
					
				| @ -8,8 +8,12 @@ if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") | |||||||
| endif () | endif () | ||||||
| 
 | 
 | ||||||
| find_package (PkgConfig REQUIRED) | find_package (PkgConfig REQUIRED) | ||||||
| pkg_check_modules (NCURSESW REQUIRED ncursesw) |  | ||||||
| pkg_check_modules (ACL libacl) | pkg_check_modules (ACL libacl) | ||||||
|  | pkg_check_modules (NCURSESW ncursesw) | ||||||
|  | if (NOT NCURSESW_FOUND) | ||||||
|  | 	find_library (NCURSESW_LIBRARIES NAMES ncursesw) | ||||||
|  | 	find_path (NCURSESW_INCLUDE_DIRS ncurses.h PATH_SUFFIXES ncurses) | ||||||
|  | endif () | ||||||
| 
 | 
 | ||||||
| add_executable (${PROJECT_NAME} ${PROJECT_NAME}.cpp) | add_executable (${PROJECT_NAME} ${PROJECT_NAME}.cpp) | ||||||
| target_include_directories (${PROJECT_NAME} PUBLIC ${NCURSESW_INCLUDE_DIRS}) | target_include_directories (${PROJECT_NAME} PUBLIC ${NCURSESW_INCLUDE_DIRS}) | ||||||
|  | |||||||
							
								
								
									
										10
									
								
								sdn.cpp
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								sdn.cpp
									
									
									
									
									
								
							| @ -39,22 +39,22 @@ | |||||||
| #include <libgen.h> | #include <libgen.h> | ||||||
| #include <pwd.h> | #include <pwd.h> | ||||||
| #include <signal.h> | #include <signal.h> | ||||||
| #include <sys/acl.h> |  | ||||||
| #include <sys/stat.h> | #include <sys/stat.h> | ||||||
| #include <sys/types.h> | #include <sys/types.h> | ||||||
|  | #include <sys/wait.h> | ||||||
| #include <time.h> | #include <time.h> | ||||||
| #include <unistd.h> | #include <unistd.h> | ||||||
| 
 | 
 | ||||||
| #ifdef __linux__ | #ifdef __linux__ | ||||||
| #include <acl/libacl.h> |  | ||||||
| #include <sys/inotify.h> | #include <sys/inotify.h> | ||||||
|  | // ACL information is not important enough to be ported
 | ||||||
|  | #include <acl/libacl.h> | ||||||
|  | #include <sys/acl.h> | ||||||
|  | #include <sys/xattr.h> | ||||||
| #else | #else | ||||||
| #include <sys/event.h> | #include <sys/event.h> | ||||||
| #endif | #endif | ||||||
| #include <ncurses.h> | #include <ncurses.h> | ||||||
| #include <sys/types.h> |  | ||||||
| #include <sys/wait.h> |  | ||||||
| #include <sys/xattr.h> |  | ||||||
| 
 | 
 | ||||||
| // To implement cbreak() with disabled ^S that gets reënabled on endwin()
 | // To implement cbreak() with disabled ^S that gets reënabled on endwin()
 | ||||||
| #define NCURSES_INTERNALS | #define NCURSES_INTERNALS | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user