Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8372753
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T14:30:59+00:00 2026-06-09T14:30:59+00:00

I have an application that has normally compiled fine. It uses two non-standard functions

  • 0

I have an application that has normally compiled fine. It uses two “non-standard” functions (both in cstdlib if I’m not mistaken): sleep() and daemon(). Upon updating my system I discovered my program will no longer compile (it still compiles on an older system of mine). GCC gives me this message:

error: 'daemon' was not declared in this scope
error: 'sleep' was not declared in this scope

I remember once in the past I had this same issue with sleep() and including cstdlib resolved the problem. I cannot find a change log for cstdlib and have no idea where the function was moved to (if not removed). I am also assuming the same thing happened to daemon(). I cannot find anything related to this in google.

Does anyone know where these went, or better yet know where I can find out in the future in case I run into this problem yet again?

I know daemon() is a lazy way of doing things, and could write a proper way to daemonize this program myself (using fork and such), but using it is so convenient.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T14:31:00+00:00Added an answer on June 9, 2026 at 2:31 pm

    Linux man pages often include the header files needed for most functions try

    man daemon
    

    or

    man 3 sleep
    

    Both of which probably say that you need #include <unistd.h>

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an application that has two localization options at the moment through .resx
I have an application that has two threads. The first one (the main thread)
I have a web application that uses ASP.NET with InProc session handling. Normally, everything
I have an application that has 2 beans with the same name, but which
We have an application that has a database full of polygons (currently stored as
I have a application that has an activity that shows message logs. The thing
i have an application that has a dependancy on gdiplus. i need the application
I have an application that has a list of buttons and has customized tooltips.
I have an application that has a .sql file in it. The sql file
We have an application that has a WCF service (*.svc) running on IIS7 and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.