Index: lpr.c =================================================================== --- lpr.c (revision 11588) +++ lpr.c (revision 11589) @@ -1,7 +1,3 @@ -/* for popen() */ -#define _DEFAULT_SOURCE -#define _BSD_SOURCE - #include "config.h" #include @@ -13,6 +9,7 @@ #include "data.h" #include "plugins.h" #include "compat_misc.h" +#include "safe_fs.h" #include "hid.h" #include "../export_ps/ps.h" @@ -85,7 +82,7 @@ filename = options[HA_lprcommand].str_value; printf("LPR: open %s\n", filename); - f = popen(filename, "w"); + f = pcb_popen(filename, "w"); if (!f) { perror(filename); return; @@ -93,7 +90,7 @@ ps_hid_export_to_file(f, options); - fclose(f); + pcb_pclose(f); } static void lpr_parse_arguments(int *argc, char ***argv)