Skip to content

Commit

Permalink
特定のMacOSバージョンでRedisインストールに失敗しないようにする
Browse files Browse the repository at this point in the history
  • Loading branch information
yuki777 committed Apr 6, 2024
1 parent 75b4620 commit f3ad718
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -228,3 +228,12 @@ getInstallDir() {
echo "$XDG_DATA_HOME/$suffix"
fi
}

# https://github.com/pj8/dbdb/issues/62
redisPatch() {
if [[ $1 =~ ^6\.[0-9]+\.[0-9]+$ ]] && [ "$(getOS)" = "macos" ]; then
sed -i '' '/#ifdef __APPLE__/a\
#define _DARWIN_C_SOURCE
' $2
fi
}
1 change: 1 addition & 0 deletions redis/create.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ extractFile $dir $optFileName
if [ ! -e $dir/basedir/src/redis-server ]; then
cd $dir/basedir
echo "Installing..." 1>&2
redisPatch $optVersion $dir/basedir/src/config.h
make > /dev/null 2>&1
fi

Expand Down

0 comments on commit f3ad718

Please sign in to comment.