diff --git a/src/util/select.cc b/src/util/select.cc index 7d8c1ec..197f83f 100644 --- a/src/util/select.cc +++ b/src/util/select.cc @@ -18,8 +18,6 @@ #include "select.h" -Select *Select::instance = NULL; - fd_set Select::dummy_fd_set; sigset_t Select::dummy_sigset; diff --git a/src/util/select.h b/src/util/select.h index ae6226f..0b7b0a2 100644 --- a/src/util/select.h +++ b/src/util/select.h @@ -34,16 +34,12 @@ class Select { public: static Select &get_instance( void ) { - // NB: not thread-safe - if ( !instance ) { - instance = new Select; - } - return *instance; + /* COFU may or may not be thread-safe, depending on compiler */ + static Select instance; + return instance; } private: - static Select *instance; - Select() : max_fd( -1 ) , got_any_signal( 0 )