typedef struct user {
    char name[MAX_NAME];
    char profile_pic[MAX_NAME];  // This is a *filename*, not the file contents.
    struct post *first_post;
    struct user *friends[MAX_FRIENDS];
    struct user *next;
} User;

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

int make_post(const User *author, User *target, char *contents) {
    if(author == NULL || target == NULL){
        printf("Returning 2\n");
        return 2;
    }

    //We only check in one list because we assume that make_friends works properly
    int flag = 0;
    for(int i=0; i<MAX_FRIENDS; i++){
        if ((author->friends[i] != NULL) && (author->friends[i]->name == target->name)){
            flag = 1;
        }
    }
    if(flag != 1){    //if flag == 1, then they are friends. So we return if != 1.
        return 1;
    }

    Post *newpost = malloc(sizeof(Post));
    strcpy(newpost->author, author->name);
    newpost->contents = contents;

    time_t creation_time = time(NULL);
    *(newpost->date ) = creation_time;

    newpost->next = target->first_post;
    target->first_post = newpost;


    return 0;

}
problem with newpost->date;