genode/repos/libports/src/lib/libc/errno.cc

22 lines
431 B
C++
Raw Normal View History

2011-12-22 16:19:25 +01:00
/*
* \brief C-library back end
* \author Norman Feske
* \date 2008-11-11
*
* Note: this version not thread safe
*/
/*
* Copyright (C) 2008-2017 Genode Labs GmbH
2011-12-22 16:19:25 +01:00
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU Affero General Public License version 3.
2011-12-22 16:19:25 +01:00
*/
#include <internal/pthread.h>
2011-12-22 16:19:25 +01:00
extern "C" int *__error(void)
{
return &pthread_self()->thread_local_errno;
2011-12-22 16:19:25 +01:00
}