1. main returns int, not void
2. (*fgets(buffer,(BUFFER_LEN-1),fp) != '\0')
When fgets() reaches the end, it returns NULL.
Then when you try to dereference that result, you segfault.
The correct loop condition is
fgets(buffer,(BUFFER_LEN-1),fp) != NULL
Also, you don't have to account for the \0 in your count, so you can just do
fgets(buffer,BUFFER_LEN,fp) != NULL