mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
bifcl: Adding support for libunistd. Also adding pragma guard for the right arch
This commit is contained in:
parent
3a18b2144c
commit
c6042154b9
2 changed files with 7 additions and 3 deletions
|
@ -53,7 +53,7 @@ set(bifcl_SRCS
|
||||||
add_executable(bifcl ${bifcl_SRCS})
|
add_executable(bifcl ${bifcl_SRCS})
|
||||||
|
|
||||||
if (MSVC)
|
if (MSVC)
|
||||||
target_link_libraries(bifcl PRIVATE zeek_windows)
|
target_link_libraries(bifcl PRIVATE libunistd)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
install(TARGETS bifcl DESTINATION bin)
|
install(TARGETS bifcl DESTINATION bin)
|
||||||
|
|
|
@ -332,7 +332,7 @@ int main(int argc, char* argv[])
|
||||||
switch ( opt ) {
|
switch ( opt ) {
|
||||||
case 'p':
|
case 'p':
|
||||||
alternative_mode = 1;
|
alternative_mode = 1;
|
||||||
plugin = optarg;
|
plugin = (char*) optarg;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 's':
|
case 's':
|
||||||
|
@ -392,13 +392,17 @@ int main(int argc, char* argv[])
|
||||||
else
|
else
|
||||||
init_alternative_mode();
|
init_alternative_mode();
|
||||||
|
|
||||||
|
fprintf(fp_netvar_init, "#ifdef __GNUC__\n");
|
||||||
fprintf(fp_netvar_init, "#pragma GCC diagnostic push\n");
|
fprintf(fp_netvar_init, "#pragma GCC diagnostic push\n");
|
||||||
fprintf(fp_netvar_init, "#pragma GCC diagnostic ignored \"-Wdeprecated-declarations\"\n\n");
|
fprintf(fp_netvar_init, "#pragma GCC diagnostic ignored \"-Wdeprecated-declarations\"\n\n");
|
||||||
|
fprintf(fp_netvar_init, "#endif\n");
|
||||||
|
|
||||||
yy_switch_to_buffer(yy_create_buffer(fp_input, YY_BUF_SIZE));
|
yy_switch_to_buffer(yy_create_buffer(fp_input, YY_BUF_SIZE));
|
||||||
yyparse();
|
yyparse();
|
||||||
|
|
||||||
|
fprintf(fp_netvar_init, "#ifdef __GNUC__\n");
|
||||||
fprintf(fp_netvar_init, "\n\n#pragma GCC diagnostic pop\n");
|
fprintf(fp_netvar_init, "\n\n#pragma GCC diagnostic pop\n");
|
||||||
|
fprintf(fp_netvar_init, "#endif\n");
|
||||||
|
|
||||||
if ( alternative_mode )
|
if ( alternative_mode )
|
||||||
finish_alternative_mode();
|
finish_alternative_mode();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue