1
0
Fork 0
mirror of https://gitlab.com/sortix/sortix.git synced 2023-02-13 20:55:38 -05:00

Fix tix-build considering empty strings as valid target triplets.

This commit is contained in:
Jonas 'Sortie' Termansen 2015-04-24 18:35:33 +02:00
parent 57cd616f59
commit b2addd979c

View file

@ -859,6 +859,13 @@ int main(int argc, char* argv[])
if ( !minfo.package_dir )
error(1, errno, "canonicalize_file_name: `%s'", argv[1]);
if ( minfo.build && !minfo.build[0] )
free(minfo.build), minfo.build = NULL;
if ( minfo.host && !minfo.host[0] )
free(minfo.host), minfo.host = NULL;
if ( minfo.target && !minfo.target[0] )
free(minfo.target), minfo.target = NULL;
if ( !minfo.build && !(minfo.build = GetBuildTriplet()) )
error(1, errno, "unable to determine build, use --build or BUILD");
if ( !minfo.host && !(minfo.host = strdup_null(getenv("HOST"))) )