Add missing <cstring> header (flutter/engine#21069)

Fixes the following compilation errors:

../../flutter/shell/platform/linux/fl_value.cc:267:3: error: use of undeclared identifier 'memcpy'
  memcpy(self->values, data, sizeof(uint8_t) * data_length);
  ^
../../flutter/shell/platform/linux/fl_value.cc:284:3: error: use of undeclared identifier 'memcpy'
  memcpy(self->values, data, sizeof(int32_t) * data_length);
  ^
../../flutter/shell/platform/linux/fl_value.cc:294:3: error: use of undeclared identifier 'memcpy'
  memcpy(self->values, data, sizeof(int64_t) * data_length);
  ^
../../flutter/shell/platform/linux/fl_value.cc:304:3: error: use of undeclared identifier 'memcpy'
  memcpy(self->values, data, sizeof(double) * data_length);
  ^

../../flutter/shell/platform/linux/fl_string_codec.cc:29:28: error: use of undeclared identifier 'strlen'
  return g_bytes_new(text, strlen(text));
                           ^

../../flutter/shell/platform/linux/fl_standard_message_codec.cc:512:23: error: use of undeclared identifier 'strlen'
      size_t length = strlen(text);
                      ^

Signed-off-by: Damian Wrobel <dwrobel@ertelnet.rybnik.pl>
This commit is contained in:
Damian Wrobel 2020-09-10 18:24:54 +02:00 committed by GitHub
parent fbfe010380
commit d71cece456
3 changed files with 3 additions and 0 deletions

View File

@ -6,6 +6,7 @@
#include "flutter/shell/platform/linux/fl_standard_message_codec_private.h"
#include <gmodule.h>
#include <cstring>
// See lib/src/services/message_codecs.dart in Flutter source for description of
// encoding.

View File

@ -5,6 +5,7 @@
#include "flutter/shell/platform/linux/public/flutter_linux/fl_string_codec.h"
#include <gmodule.h>
#include <cstring>
G_DEFINE_QUARK(fl_string_codec_error_quark, fl_string_codec_error)

View File

@ -5,6 +5,7 @@
#include "flutter/shell/platform/linux/public/flutter_linux/fl_value.h"
#include <gmodule.h>
#include <cstring>
struct _FlValue {
FlValueType type;