Skip to content

Instantly share code, notes, and snippets.

@aghosn
Created August 21, 2019 17:54
Show Gist options
  • Save aghosn/f6c7492db09b3d018e5baf6e281d0dd9 to your computer and use it in GitHub Desktop.
Save aghosn/f6c7492db09b3d018e5baf6e281d0dd9 to your computer and use it in GitHub Desktop.
#include <stdio.h>
#include <stdlib.h>
int my_errno = 0;
typedef int thread_condattr_t;
typedef int clid_t ;
typedef int thread_attr_t;
int pthread_condattr_setclock(thread_condattr_t* attr, clid_t clock_id) {
return 0;
}
int pthread_attr_getstack (thread_attr_t *attr, void **stackaddr, size_t *stacksize) {
return 0;
}
int pthread_attr_getguardsize(thread_attr_t *attr, size_t *guardsize) {
*guardsize = 0x1000;
return 0;
}
void pthread_getattr_np() {
char* ptr = (char*)(0x2);
*ptr;
}
int* __errno_location(){
return &my_errno;
// char* ptr = (char*)(0x4);
// *ptr;
}
int mprotect(void *addr, size_t len, int prot) {
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment