Skip to content

Commit

Permalink
curve: fix build erro in debian11
Browse files Browse the repository at this point in the history
Signed-off-by: Cyber-SiKu <[email protected]>
  • Loading branch information
Cyber-SiKu committed Sep 6, 2022
1 parent 2ad2362 commit 5c178fa
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion curvefs/src/client/fuse_s3_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ CURVEFS_ERROR FuseS3Client::Init(const FuseClientOption &option) {

void FuseS3Client::GetWarmUpFileList(const WarmUpFileContext_t&warmUpFile,
std::vector<std::string>& warmUpFilelist) {
struct fuse_file_info fi;
struct fuse_file_info fi{};
fi.flags &= ~O_DIRECT;
size_t rSize = 0;
std::unique_ptr<char[]> data(new char[warmUpFile.fileLen+1]);
Expand Down
1 change: 1 addition & 0 deletions curvefs/src/client/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
*/

#include <unordered_map>
#include <string>
#include "curvefs/src/client/curve_fuse_op.h"
#include "curvefs/src/client/fuse_common.h"

Expand Down
2 changes: 1 addition & 1 deletion curvefs/util/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ build_target() {
# set version
g_build_opts+=("--copt -DCURVEVERSION=${curve_version}")

if [ "$g_os" == "debian10" -o "$g_os" == "debian11" ]; then
if [ `gcc -dumpversion | awk -F'.' '{print $1}'` -gt 6 ]; then
g_build_opts+=("--config=gcc7-later")
fi

Expand Down
5 changes: 5 additions & 0 deletions ut.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,11 @@ fi

set -e

################################################################ __GCC VERSION__
if [ `gcc -dumpversion | awk -F'.' '{print $1}'` -gt 6 ]; then
g_build_opts+=("--config=gcc7-later")
fi

bazel build ... -c dbg --collect_code_coverage --copt -DHAVE_ZLIB=1 --define=with_glog=true --define=libunwind=true --copt -DGFLAGS_NS=google --copt -Wno-error=format-security --copt -DUSE_BTHREAD_MUTEX ${g_build_opts[@]}

#test_bin_dirs="bazel-bin/test/ bazel-bin/nebd/test/ bazel-bin/curvefs/test/"
Expand Down
2 changes: 1 addition & 1 deletion util/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ build_target() {
fi
g_build_opts+=("--copt -DCURVEVERSION=${version}")

if [ "$g_os" == "debian10" -o "$g_os" == "debian11" ]; then
if [ `gcc -dumpversion | awk -F'.' '{print $1}'` -gt 6 ]; then
g_build_opts+=("--config=gcc7-later")
fi

Expand Down

0 comments on commit 5c178fa

Please sign in to comment.