Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2003
    Posts
    68

    Unanswered: help - errors compiling db2 userexit program

    DB2 version 8.1 fixpak 4
    Redhat 8 Linux

    I'm trying to compile a userexit program (db2uext2.c) and I get the following errors:

    db2uext2.c: In function `ArchiveFile':
    db2uext2.c:732: `offset_t' undeclared (first use in this function)
    db2uext2.c:732: (Each undeclared identifier is reported only once
    db2uext2.c:732: for each function it appears in.)
    db2uext2.c:732: parse error before "offsetll"
    db2uext2.c:804: `offsetll' undeclared (first use in this function)
    db2uext2.c:804: parse error before "startingPage"

    Line 732:
    offset_t offsetll;

    Line 804:
    offsetll = (offset_t)startingPage * 4096;



    Declare for offset_t in the program:

    /* HP does not define llseek and offset_t */
    #ifdef _INCLUDE_POSIX_SOURCE
    # define llseek lseek
    typedef unsigned long offset_t;
    #endif



    Do I comment this out? Delete it altogether?

  2. #2
    Join Date
    Sep 2011
    Posts
    1

    try this

    gcc -D_INCLUDE_POSIX_SOURCE -o db2uext2 db2uext2.c

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •