--- searchandrescue-1.5.0.orig/pconf/proc.c +++ searchandrescue-1.5.0/pconf/proc.c @@ -18,6 +18,7 @@ static int PConfScanFileString( const char *filename, const char *s ); static char *PConfDependMatchFile( + pconf_core_struct *core_ptr, platform_struct *platform_ptr, int type, const char *path, struct stat *stat_buf ); @@ -585,6 +586,7 @@ static int PConfScanFileString( * error. */ static char *PConfDependMatchFile( + pconf_core_struct *core_ptr, platform_struct *platform_ptr, int type, const char *path, struct stat *stat_buf ) @@ -635,7 +637,11 @@ static char *PConfDependMatchFile( } /* Empty path list? */ if((path_list == NULL) || (total_paths < 1)) + { + // Empty path list + if(core_ptr->verbose) printf("Empty path list\n"); return(NULL); + } /* Itterate through search paths. */ new_path = NULL; @@ -667,8 +673,11 @@ static char *PConfDependMatchFile( ); /* Exists? */ - if(!stat(new_path, stat_buf)) + if(!stat(new_path, stat_buf)) { + if (core_ptr -> verbose) printf("Returning path %s\n.", new_path); return(new_path); + } + if (core_ptr -> verbose) printf("Failed match path %s\n.", new_path); } } @@ -794,7 +803,7 @@ static int PConfDependCheck( /* Check if the path exists on this platform. */ new_path = PConfDependMatchFile( - platform_ptr, depend_ptr->type, path_ptr, + core_ptr, platform_ptr, depend_ptr->type, path_ptr, &stat_buf ); if(new_path != NULL) --- searchandrescue-1.5.0.orig/sar/makefile_append.ini +++ searchandrescue-1.5.0/sar/makefile_append.ini @@ -30,9 +30,10 @@ RMFLAGS = -f # Build rules: $(BIN): prebuild modules postbuild +# Modified this rule to include dpkg-buildflags. modules: $(OBJ_C) $(OBJ_CPP) @echo -n "Linking modules..." - @$(CPP) $(OBJ_C) $(OBJ_CPP) -o $(BIN) $(LIBS) $(LIB_DIRS) + @$(CPP) $(OBJ_C) $(OBJ_CPP) -o $(BIN) $(LIBS) $(LIB_DIRS) $(shell dpkg-buildflags --get LDFLAGS) @echo -n " " @-$(LS) $(LSFLAGS) $(BIN)