Rombobjörn

summaryrefslogtreecommitdiff
path: root/thread_wrapper/pthread_create_locator.c
blob: df5eef7d88e07de7bdb4e09d859b9b62d3830603 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// Ada Milter API thread wrapper
// Copyright 2013 B. Persson, Bjorn@Rombobeorn.se
//
// This library is free software: you can redistribute it and/or modify it
// under the terms of the GNU General Public License version 3, as published
// by the Free Software Foundation.


// _GNU_SOURCE must be defined to make RTLD_NEXT available. Keeping this in a
// separate file avoids any surprising effects that _GNU_SOURCE might have on
// other header files that thread_wrapper.c includes.


#include "pthread_create_locator.h"

#define _GNU_SOURCE
#include <dlfcn.h>


void* dlsym_next_pthread_create() {
   return dlsym(RTLD_NEXT, "pthread_create");
}