Skip to content

Commit

Permalink
Fix RocksDB Lite build failure in c_test.cc
Browse files Browse the repository at this point in the history
Summary:
Fix the following RocksDB Lite build failure in c_test.cc

db/c_test.c:1051:3: error: implicit declaration of function 'fprintf' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
  fprintf(stderr, "SKIPPED\n");
  ^
db/c_test.c:1051:3: error: declaration of built-in function 'fprintf' requires inclusion of the header <stdio.h> [-Werror,-Wbuiltin-requires-header]
db/c_test.c:1051:11: error: use of undeclared identifier 'stderr'
  fprintf(stderr, "SKIPPED\n");
          ^
3 errors generated.
Closes facebook#1479

Differential Revision: D4151160

Pulled By: yhchiang

fbshipit-source-id: a471a30
  • Loading branch information
yhchiang authored and Facebook Github Bot committed Nov 9, 2016
1 parent d133b08 commit a9fb346
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion db/c_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file. See the AUTHORS file for names of contributors. */

#include <stdio.h>

#ifndef ROCKSDB_LITE // Lite does not support C API

#include "rocksdb/c.h"

#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
Expand Down

0 comments on commit a9fb346

Please sign in to comment.