Menu

#39 Build Fails on call to open()

closed-fixed
nobody
5
2013-04-13
2009-07-31
Anonymous
No

If using GCC 4.2.4 or later, open() must be called with three arguments if O_CREAT is specified. The third argument must specify the file mode if the file is created. I've added S_IRWXU to the offending call in /device/nandflash/nandflash_smallblock.c line 519.

ERROR:
... declared with attribute error: open with O_CREAT in second argument needs 3 arguments.

SOLUTION:
Edit /device/nandflash/nandflash_smallblock.c line 519 to be:
if ((nf->fdump=open(dev->dump, FILE_FLAG, S_IRWXU)) < 0)

Discussion

  • kangsh

    kangsh - 2010-11-22
    • status: open --> closed-fixed
     
  • kangsh

    kangsh - 2010-11-22

    Fixed in the latest version.

     

Log in to post a comment.