Open Source Development

Power Open Source Development

Explore the open source tools and capabilities for building and deploying modern applications on IBM Power platforms including AIX, IBM i, and Linux.


#Power


#Power

 View Only
  • 1.  header file missing

    Posted Tue February 04, 2025 10:30 AM

    Hello,

    i have an (portable) application that needs sys/sendfile.h to work. This file exists in Linux (i checked) but not on AIX. Can it be installed or is it a programming error?

    regards

    Jörg



    ------------------------------
    Joerg Luehmann
    ------------------------------

    #AIXOpenSource


  • 2.  RE: header file missing

    Posted Tue February 04, 2025 12:20 PM

    Hi Joerg Luehmann,

    Yes, in AIX we do not have sys/sendfile.h. This is a part of glibc in Linux. I checked the code to see what is going on.

    If you are using sendfile () in Linux, I think then AIX has a similar function in send_file() via /usr/include/sys/socket.h.

    All you need to do is change sendfile() to send_file() and include that file. [#include <sys/socket.h>]

    You may want to check that out and try?? Hope this is useful. 



    ------------------------------
    Aditya Kamath
    ------------------------------