Skip to content

Commit

Permalink
stored: add support for glusterfs 6.0
Browse files Browse the repository at this point in the history
GlusterFS 6.0 contains a new glfs_truncate() call with 4 parameters.
Bareos (18.2+) detect this and add a macro supporting both versions. For
autoconf we simply check for GLFS_STAT_ALL that was introduced in v6.0
and implement the same workaround as for 18.2+.
  • Loading branch information
arogge committed Jul 9, 2020
1 parent 916b63c commit ee395cf
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/stored/backends/gfapi_device.h
Expand Up @@ -30,6 +30,14 @@

#include <api/glfs.h>

/*
* GLFS_STAT_ALL is introduced in v6.0 which also introduces two additional
* parameters for glfs_truncate()
*/
#if defined GLFS_STAT_ALL
#define glfs_ftruncate(fd, offset) glfs_ftruncate(fd, offset, NULL, NULL)
#endif

class gfapi_device: public DEVICE {
private:
char *m_gfapi_configstring;
Expand Down

0 comments on commit ee395cf

Please sign in to comment.