Why segmentation fault ?
typedef struct post {
    char author[MAX_NAME];
    char *contents;
    time_t *date;
    struct post *next;
} Post;

Post *post_ptr = malloc(sizeof(Post));
strncpy(post_ptr->author, author->name, 31);
post_ptr->author[31] = '\0';
post_ptr->contents = contents;
time_t *time_ptr = NULL;
*time_ptr = time(NULL);
post_ptr->date = time_ptr;
post_ptr->next = target->first_post;
target->first_post = post_ptr->next;
return 0;