1 /* 2 * Copyright (c) 2015 Travis Geiselbrecht 3 * 4 * Use of this source code is governed by a MIT-style 5 * license that can be found in the LICENSE file or at 6 * https://opensource.org/licenses/MIT 7 */ 8 9 #include <errno.h> 10 11 /* completely un-threadsafe implementation of errno */ 12 /* TODO: pull from kernel TLS or some other thread local storage */ 13 static int _errno; 14 __geterrno(void)15int *__geterrno(void) { 16 return &_errno; 17 } 18 19