Skip to content

Instantly share code, notes, and snippets.

@xmarnic
Created May 9, 2024 20:30
Show Gist options
  • Save xmarnic/ac05d066c76de45fc252d6ec4a515093 to your computer and use it in GitHub Desktop.
Save xmarnic/ac05d066c76de45fc252d6ec4a515093 to your computer and use it in GitHub Desktop.
An attempt at fixing the VBox Guest additions addons error for Ubuntu Server 24.04 LTS
#!/usr/bin/bash
declare -a args
for var; do
if [ $var = '/tmp/vbox.0/VBoxGuest-common.c' ];
then
sed -i -e 's/strlcpy/strscpy/g' $var
fi
if [ $var = '/tmp/vbox.0/VBoxGuest-linux.c' ];
then
sed -i -e 's/strlcpy/strscpy/g' $var
fi
if [ $var = '/tmp/vbox.0/vfsmod.c' ];
then
sed -i -e 's/strlcpy/strscpy/g' $var
fi
args[${#args[@]}]="$var"
done
/usr/bin/gcc-13x "${args[@]}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment