Hi guys!)
There's a peace of code and I can't understand - what's wrong in it -

#include <unistd.h>
#include <stdio.h>
#include <sys/types.h>
#include <sys/wait.h>
int main (void)
{
int status;
pid_t pid;
if (!fork ( )) 
return 1;
pid = wait (&status);
if (pid == -1)
perror ("wait");
printf ("pid=%d\n", pid);

if (WIFEXITED (status))
printf ("Normal termination with exit status=%d\n", WEXITSTATUS (status)); 

if (WIFSIGNALED (status))
printf ("Killed by signal=%d%s\n",WTERMSIG (status),

WCOREDUMP (status) ? " (dumped core)" : "");
if (WIFSTOPPED (status))
printf ("Stopped by signal=%d\n",WSTOPSIG (status));

if (WIFCONTINUED (status))
printf ("Continued\n");

abort();  // here warning
}

warning -

Incompatiple implicit declaration of build-in function 'abort'

please tell me - what should I do to fix this error?
big thanks in advance)

The underlying problem is failure to include <stdlib.h> and using the abort function without a visible prototype.

commented: ++++++++++ +3
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.