critical impact:
scandir, alphasort - different header file (CrCh91)
Problem description
The required header files for the scandir and alphasort functions are different on Tru64 UNIX and HP-UX .
The scandir function scans directory contents, while the alphasort function sorts directory contents.
On Tru64 UNIX, to use these functions, you include the following header
files: # include <sys/types.h># include <sys/dir.h>
On HP-UX, to use these functions, you include the following header
file: # include <dirent.h> Identifiers
See also
Solution description
Modify header file include statements.
Replace the <sys/dir.h> header file with the <dirent.h> header file. Do not include both <sys/dir.h> and <dirent.h> in the same application. Review the applicable manpages and code for more detail. See also
Problem summary
| classifications |
source types |
OS release |
severity |
type |
| HDR, IO |
C, C++ |
any HP-UX 11i version |
critical |
changed |
|