Fix inline usage
authorWouter Verhelst <w@uter.be>
Thu, 3 Mar 2011 14:07:26 +0000 (15:07 +0100)
committerWouter Verhelst <w@uter.be>
Thu, 3 Mar 2011 14:07:26 +0000 (15:07 +0100)
inlines must be static, or gcc with some particular set of options (C99?
-Wall -Werror? dunno, don't care) won't compile it.

nbd-server.c

index ec5b84f..5cace72 100644 (file)
@@ -320,7 +320,7 @@ int authorized_client(CLIENT *opts) {
  * @param buf a buffer
  * @param len the number of bytes to be read
  **/
  * @param buf a buffer
  * @param len the number of bytes to be read
  **/
-inline void readit(int f, void *buf, size_t len) {
+static inline void readit(int f, void *buf, size_t len) {
        ssize_t res;
        while (len > 0) {
                DEBUG("*");
        ssize_t res;
        while (len > 0) {
                DEBUG("*");
@@ -342,7 +342,7 @@ inline void readit(int f, void *buf, size_t len) {
  * @param buf a buffer containing data
  * @param len the number of bytes to be written
  **/
  * @param buf a buffer containing data
  * @param len the number of bytes to be written
  **/
-inline void writeit(int f, void *buf, size_t len) {
+static inline void writeit(int f, void *buf, size_t len) {
        ssize_t res;
        while (len > 0) {
                DEBUG("+");
        ssize_t res;
        while (len > 0) {
                DEBUG("+");