diff options
Diffstat (limited to 'gcc/go/gofrontend/unsafe.cc')
-rw-r--r-- | gcc/go/gofrontend/unsafe.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/go/gofrontend/unsafe.cc b/gcc/go/gofrontend/unsafe.cc index 51d812b..e219f61 100644 --- a/gcc/go/gofrontend/unsafe.cc +++ b/gcc/go/gofrontend/unsafe.cc @@ -6,6 +6,7 @@ #include "go-system.h" +#include "go-c.h" #include "types.h" #include "gogo.h" @@ -130,5 +131,9 @@ Gogo::import_unsafe(const std::string& local_name, bool is_local_name_exported, if (add_to_globals) this->add_named_object(no); - this->imported_unsafe_ = true; + if (!this->imported_unsafe_) + { + go_imported_unsafe(); + this->imported_unsafe_ = true; + } } |