【问题标题】:open dir failed. Value too large for defined data type打开目录失败。对于定义的数据类型,值太大
【发布时间】:2014-11-07 11:01:56
【问题描述】:

对于类似的问题,我已经尝试了堆栈溢出中的所有现有解决方案: 大多数情况下,建议将_FILE_OFFSET_BITS 声明为64。但这没有用。

示例代码:

dir = opendir("/data/system/dropbox");
if (!dir) {
    PRINT_ERROR("open dir - %s failed. %s\n",
            "dropbox", strerror(errno));
    return -errno;
}

以下是我尝试打开目录(/data/system/dropbox)时遇到的错误(strerror(errno))。我正在使用uClibc

>> Value too large for defined data type

【问题讨论】:

  • 当我尝试打开目录时”使用哪个(系统-)调用/函数?
  • @MichaelWalz 抱歉没有发布代码。我错过了。现已更新。
  • @alk opendir 调用。我更新了q。请再看看。
  • @alk 我刚刚检查过。它已启用。 grep -irn "UCLIBC_HAS_LFS=y" * ---> 包括/config/auto.conf:20:UCLIBC_HAS_LFS=y uClibc.conf:88:UCLIBC_HAS_LFS=y

标签: c opendir uclibc


【解决方案1】:

如果这恰好发生在大端机器上,您可能需要确保您使用的是最新版本的 uClibc。你的症状听起来像是去年修复的this bug

【讨论】:

  • 我在我的 uclibc 中看不到修复的确切路径。但是采用最新的 uclibc 对我有用。我现在正在尝试获取为我工作的补丁
猜你喜欢
  • 1970-01-01
  • 2013-08-21
  • 1970-01-01
  • 1970-01-01
  • 2012-12-03
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2017-09-10
相关资源
最近更新 更多