anjiahao1 opened a new issue, #14260:
URL: https://github.com/apache/nuttx/issues/14260

   ### Description / Steps to reproduce the issue
   
   I have been using libarchive in nuttx, and everything was fine until stdio.h 
included the nuttx header file. There was a conflict between the header file in 
nuttx and libarchive. I think I should modify `stdio.h` so that stdio.h does 
not include any `nuttx/*.h`. I tried to delete `nuttx/*.h `but there were many 
compilation errors.
   
   
   ```
   libarchive/libarchive/archive_read_open_filename.c:89:17: error: conflicting 
types for ‘file_read’; have ‘ssize_t(struct archive *, void *, const void **)’ 
{aka ‘long int(struct archive *, void *, const void **)’}
      89 | static ssize_t  file_read(struct archive *, void *, const void 
**buff);
         |                 ^~~~~~~~~
   /home/ajh/work/archivefs/nuttx/include/nuttx/fs/fs.h:1426:9: note: previous 
declaration of ‘file_read’ with type ‘ssize_t(struct file *, void *, size_t)’ 
{aka ‘long int(struct file *, void *, long unsigned int)’}
    1426 | ssize_t file_read(FAR struct file *filep, FAR void *buf, size_t 
nbytes);
         |         ^~~~~~~~~
   libarchive/libarchive/archive_read_open_filename.c:90:17: error: conflicting 
types for ‘file_seek’; have ‘int64_t(struct archive *, void *, int64_t,  int)’ 
{aka ‘long int(struct archive *, void *, long int,  int)’}
      90 | static int64_t  file_seek(struct archive *, void *, int64_t request, 
int);
         |                 ^~~~~~~~~
   /
   ```
   
   ### On which OS does this issue occur?
   
   [OS: Linux]
   
   ### What is the version of your OS?
   
   ubunt24,04
   
   ### NuttX Version
   
   master
   
   ### Issue Architecture
   
   [Arch: all]
   
   ### Issue Area
   
   [Area: Api], [Area: Build System]
   
   ### Verification
   
   - [X] I have verified before submitting the report.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to