diff --git a/builds/posix/prefix.freebsd b/builds/posix/prefix.freebsd index 42a415d387..edd46859bd 100644 --- a/builds/posix/prefix.freebsd +++ b/builds/posix/prefix.freebsd @@ -24,7 +24,7 @@ LINK_OPTS+=-Wl,-rpath,../gen/firebird/lib PROD_FLAGS=-O -fno-builtin -DNDEBUG -DFREEBSD -pipe -MMD -fPIC DEV_FLAGS=-ggdb -DFREEBSD -pipe -MMD -p -fPIC -Wall -EMBED_UTIL_TARGETS=gstat gsec nbackup fbguard fb_lock_print -CLIENT_UTIL_TARGETS=gstat gsec fbguard fbmgr_bin nbackup fb_lock_print +EMBED_UTIL_TARGETS=gstat gsec fbguard nbackup fb_lock_print fbsvcmgr fbtracemgr +CLIENT_UTIL_TARGETS=gstat gsec fbguard nbackup fb_lock_print fbsvcmgr fbtracemgr Physical_IO_Module=os/posix/unix.cpp diff --git a/builds/posix/prefix.freebsd_amd64 b/builds/posix/prefix.freebsd_amd64 index 5544e4f733..7657224bd6 100644 --- a/builds/posix/prefix.freebsd_amd64 +++ b/builds/posix/prefix.freebsd_amd64 @@ -24,8 +24,8 @@ LINK_OPTS+=-Wl,-rpath,../gen/firebird/lib PROD_FLAGS=-O -fno-builtin -DFREEBSD -DAMD64 -pipe -MMD -fPIC DEV_FLAGS=-ggdb -DFREEBSD -DAMD64 -pipe -MMD -p -fPIC -Wall -Wno-non-virtual-dtor -EMBED_UTIL_TARGETS=gstat gsec nbackup fbguard fb_lock_print -CLIENT_UTIL_TARGETS=gstat gsec fbguard fbmgr_bin nbackup fb_lock_print +EMBED_UTIL_TARGETS=gstat gsec fbguard nbackup fb_lock_print fbsvcmgr fbtracemgr +CLIENT_UTIL_TARGETS=gstat gsec fbguard nbackup fb_lock_print fbsvcmgr fbtracemgr Physical_IO_Module=os/posix/unix.cpp # This is needed due to broken port of gcc diff --git a/src/utilities/nbackup.cpp b/src/utilities/nbackup.cpp index e4421727d0..645cb6600b 100644 --- a/src/utilities/nbackup.cpp +++ b/src/utilities/nbackup.cpp @@ -181,8 +181,6 @@ namespace return rc; } #else // HAVE_POSIX_FADVISE -#define POSIX_FADV_SEQUENTIAL 0 -#define POSIX_FADV_NOREUSE 0 int fb_fadvise(int, off_t, size_t, int) { return 0; @@ -450,15 +448,19 @@ void NBackup::open_database_scan() if (dbase < 0) b_error::raise(uSvc, "Error (%d) opening database file: %s", errno, dbname.c_str()); +#ifdef POSIX_FADV_SEQUENTIAL int rc = fb_fadvise(dbase, 0, 0, POSIX_FADV_SEQUENTIAL); if (rc) b_error::raise(uSvc, "Error (%d) in posix_fadvise(SEQUENTIAL) for %s", rc, dbname.c_str()); +#endif // POSIX_FADV_SEQUENTIAL +#ifdef POSIX_FADV_NOREUSE if (direct_io) { rc = fb_fadvise(dbase, 0, 0, POSIX_FADV_NOREUSE); if (rc) b_error::raise(uSvc, "Error (%d) in posix_fadvise(NOREUSE) for %s", rc, dbname.c_str()); } +#endif // POSIX_FADV_NOREUSE #endif // WIN_NT }